| Home >> All >> org >> apache >> derby >> iapi >> store |
Package Samples:
org.apache.derby.iapi.store.access.conglomerate
org.apache.derby.iapi.store.access.xa
org.apache.derby.iapi.store.access
org.apache.derby.iapi.store.raw.data
org.apache.derby.iapi.store.raw.log
org.apache.derby.iapi.store.raw.xact
org.apache.derby.iapi.store.raw
Classes:
LogicalUndo: A Logical undo is an undo operation that operates on a different page from the page that has the original change. The reason one would need logical undo is when an uncommitted row move from one page to another in a nested internal transaction which is committed. For example, an uncommitted insert on a btree may be moved by a later split operation to another page, the split operation will have committed. If the insert needs to be rolled back, it can only be found at the new page where the split puts it and not at the original page where it is inserted. The logging and recovery system does not know ...
ContainerHandle: A Container contains a contigious address space of pages, the pages start at page number Container.FIRST_PAGE_NUMBER and are numbered sequentially. The page size is set at addContainer() time. RESOLVE: this style of coding is not currently enforced If the caller calls getPage (or one of its variants) more than once on the same page, the caller must call unlatch a corresponding number of times in order to ensure that the page is latched. For example: Container c; Page p1 = c.getPage(Container.FIRST_PAGE_NUMBER); Page p2 = c.getPage(Container.FIRST_PAGE_NUMBER); p1.unlatch(); -- Page is still latched. ...
Page: A Page contains an ordered set of records which are the stored form of rows. A record is a stream of bytes created from a row array. The record contains one or more fields, fields have a one to one correlation with the DataValueDescriptor's contained within a row array. A Page represents exclusive access to a data page within a container. Exclusive access is released by calling the unlatch() method, once that occurs the caller must no longer use the Page reference. Several of the methods in Page take a RecordHandle as an argument. RecordHandles are obtained from a Page, while holding exclusive ...
RawStoreFactory: RawStoreFactory implements a single unit of transactional storage. A RawStoreFactory contains Segments and Segments contain Containers. Segments are identified by integer identifiers that are unique within a RawStoreFactory. Containers are also identified by unique integer identifiers within a RawStoreFactory, but will overlap with segment identifiers. LIMITS This is a list of (hopefully) all limits within the raw store. Where a size has more than one limit all are documented (rather than just the most restrictive) so that the correct limit can be found if the most restictive is every removed. ...
RowUtil: A set of static utility methods to work with rows. A row or partial row is described by two or three parameters. DataValueDescriptor[] row - an array of objects, one per column. FormatableBitSet validColumns - an indication of which objects in row map to which columns These objects can describe a complete row or a partial row. A partial row is one where a sub-set (e.g. columns 0, 4 and 7) of the columns are supplied for update, or requested to be fetched on a read. Here's an example of code to set up a partial column list to fetch the 0th (type FOO), 4th (type BAR), and 7th (type MMM) columns from ...
BackingStoreHashtable: A BackingStoreHashtable is a utility class which will store a set of rows into an in memory hash table, or overflow the hash table to a tempory on disk structure. All rows must contain the same number of columns, and the column at position N of all the rows must have the same format id. If the BackingStoreHashtable needs to be overflowed to disk, then an arbitrary row will be chosen and used as a template for creating the underlying overflow container. The hash table will be built logically as follows (actual implementation may differ). The important points are that the hash value is the standard ...
ConglomerateController: A conglomerate is an abstract storage structure (they correspond to access methods). The ConglomerateController interface is the interface that access manager clients can use to manipulate the contents of the underlying conglomerate. Each conglomerate holds a set of rows. Each row has a row location. The conglomerate provides methods for: Inserting rows, Fetching, deleting, and replacing entire rows by row location, and fetching and updating individual columns of a row identified by row location. Conglomerates do not provide any mechanism for associative access to rows within the conglomerate; ...
SortObserver: A SortObserver is an object that is used as a callback by the sorter. It allows the sort client to do whatever they want from the context of a sort. It contains 2 callback methods: insertDuplicateKey() and insertNonDuplicateKey() . On each SortController.insert() , one or the other of these methods will be called, depending on whether the given row has a key that has been seen before or not. Some sample uses include: Sorts from Language : Language typically recycles data type wrappers. So the language layer uses SortObservers to clone rows that are kept by the sorter. Distinct sorts : The sorter ...
TransactionController: The TransactionController interface provides methods that an access client can use to control a transaction, which include the methods for gaining access to resources (conglomerates, scans, etc.) in the transaction controller's storage manager. TransactionControllers are obtained from an AccessFactory via the getTransaction method. Each transaction controller is associated with a transaction context which provides error cleanup when standard exceptions are thrown anywhere in the system. The transaction context performs the following actions in response to cleanupOnError: If the error is an instance ...
Qualifier: A structure which is used to "qualify" a column. Specifies that the column value in a given column identified by column id is to be compared via a specific operator to a particular DataValueDescriptor value. The implementation of this interface is provided by the client; the methods of Qualifier are the methods the access code uses to use it. Arrays of qualifiers are provided to restrict the rows returned by scans. A row is returned from a scan if all qualifications in the array return true. A qualification returns true if in the following pseudo-code compare_result is true. if (qualifier.negateCompareResult()) ...
XATransactionController: This interface allows access to commit,prepare,abort global transactions as part of a two phase commit protocol, during runtime. These interfaces have been chosen to be exact implementations required to implement the XAResource interfaces as part of the JTA standard extension. It is expected that the following interfaces are only used during the runtime portion of a 2 phase commit connection. If a runtime exception causes a transaction abort (of a transaction that has not been successfully prepared), then the transaction will act as if xa_rollback() had been called. The transaction will be aborted ...
FileResource: Management of file resources within a database. Suitable for jar files, images etc. A file resource is identified by the pair (name,generationId). Name is an arbitrary String supplied by the caller. GenerationId is a non-repeating sequence number constructed by the database. Within a database a (name,generationId) pair uniquely identifies a version of a file resource for all time. Newer generation numbers reflect newer versions of the file. A database supports the concept of a designated current version of a fileResource. The management of the current version is transactional. The following rules ...
DynamicCompiledOpenConglomInfo: Information that can be "compiled" and reused per transaction per open operation. This information is read only by the caller and written by user. Likely information kept in this object is a set of scratch buffers which will be used by openScan() and thus must not be shared across multiple threads/openScan()'s/openConglomerate()'s. The goal is to optimize repeated operations like btree inserts, by allowing a set of scratch buffers to be reused across a repeated execution of a statement like an insert/delete/update. This information is obtained from the getDynamicCompiledConglomInfo(conglomid) method ...
StoreCostController: The StoreCostController interface provides methods that an access client (most likely the system optimizer) can use to get store's estimated cost of various operations on the conglomerate the StoreCostController was opened for. It is likely that the implementation of StoreCostController will open the conglomerate and will leave the conglomerate open until the StoreCostController is closed. This represents a significant amount of work, so the caller if possible should attempt to open the StoreCostController once per unit of work and rather than close and reopen the controller. For instance if the ...
DatabaseInstant: A DatabaseInstant is a quantity which the database associates with events to collate them. This interface is used in the column SYS.SYSSYNCINSTANTS.INSTANT. Assume a database associates a DatabaseInstant to an event E1. We call this I(E1). Also assume the same Database associates a DatabaseInstant to a second event E2. We call this I(E2). By definition If I(E1) If I(E2) = I(E2) event E1 is the same event as E2 If I(E1) > I(E2) event E1 occurred after event E2 It is not meaningful to compare a DatabaseInstant from one database with a DatabaseInstant from another. The result of such a comparison ...
StaticCompiledOpenConglomInfo: Information that can be "compiled" once and then used over and over again at execution time. This information is read only by both the caller and the user, thus can be shared by multiple threads/transactions once created. This information is obtained from the getStaticCompiledConglomInfo(conglomid) method call. It can then be used in openConglomerate() and openScan() calls for increased performance. The information is only valid until the next ddl operation is performed on the conglomerate. It is up to the caller to provide an invalidation methodology. The static info would be valid until any ddl ...
LockingPolicy: Any object that implements this interface can be used as a locking policy for accessing a container. The locking policy must use the defined lock qualifiers (ContainerLock.CIS, RowLock.RS, etc.) and the standard lock manager. (A locking policy that just performs no locking wouldn't need to use these :-) A locking policy must use the object that is an instance of Transaction (originally obtained via startTransaction() in RawStoreFactory) as the compatibilitySpace for the LockFactory calls. A locking policy must use the passed in transaction as the compatability space and the lock group. This chain ...
XAResourceManager: This interface allows access to commit,prepare,abort global transactions as part of a two phase commit protocol. These interfaces have been chosen to be exact implementations required to implement the XAResource interfaces as part of the JTA standard extension. It is expected that the following interfaces are only used during the recovery portion of 2 phase commit, when the transaction manager is cleaning up after a runtime crash - it is expected that no current context managers exist for the Xid's being operated on. The "online" two phase commit protocol will be implemented by calls directly on ...
RawTransaction: RawTransaction is the form of Transaction used within the raw store. This allows the break down of RawStore functionality into (at least) three modules (Transactions, Data, Log) without exposing internal information on the external interface. The transaction will notify any Observer's just before the transaction is committed, aborted or a rollback to savepoint occurs. The argument passed to the update() method of the Observer's will be one of RawTransaction.COMMIT - transaction is committing RawTransaction.ABORT - transaction is aborting RawTransaction.SAVEPOINTROLLBACK - transaction is being rolled ...
Conglomerate: A conglomerate is an abstract storage structure (they correspond to access methods). The Conglomerate interface corresponds to a single instance of a conglomerate. In other words, for each conglomerate in the system, there will be one object implementing Conglomerate. The Conglomerate interface is implemented by each access method. The implementation must maintain enough information to properly open the conglomerate and scans, and to drop the conglomerate. This information typically will include the id of the container or containers in which the conglomerate is stored, and my also include property ...
GenericScanController: The set of interfaces implemented by all types of ScanControllers. A scan is the mechanism for iterating over the rows in a conglomerate, the scan controller is the interface through which access clients control the underlying scan. An instance of a scan controller can be thought of as an open scan. Scans are opened from a TransactionController. A ScanController can handle partial rows. Partial rows are described in RowUtil. A scan controller is opened with a FormatableBitSet that describes the columns that need to be returned on a fetch call. This FormatableBitSet need not include any columns ...
ScanController: A scan is the mechanism for iterating over the rows in a conglomerate, the scan controller is the interface through which access clients control the underlying scan. An instance of a scan controller can be thought of as an open scan. Scans are opened from a TransactionController. A ScanController can handle partial rows. Partial rows are described in RowUtil. A scan controller is opened with a FormatableBitSet that describes the columns that need to be returned on a fetch call. This FormatableBitSet need not include any columns referenced in the qualifers, start and/or stop keys.
TransactionId: A transaction identifier that is only unique within a raw store, do not ever pass this out of raw store. During reboot, all transaction Ids that have ever generated a log record will not be reused. However, if you put away the transaction Id of a read only transaction, then the is no guarentee that the transactionId won't be reused when the system reboots. It is much safer to store away the ExternalTrasanctionId rather than the transactionId. The equals() method for TransactionId implements by value equality. MT - immutable
GlobalXact: This abstract class represents a global transaction id which can be tested for equality against other transaction ids, which can be hashed into a hash table, and which can be output as a string. This class has 2 direct subclasses. org.apache.derby.iapi.store.access.xa.XAXactId : this class is a specific implementation of the JTA Xid interface org.apache.derby.impl.store.access.GlobalXactId : this class represents internal cloudscape transaction ids The main reason for this class is to ensure that equality etc. works in a consistent way across both subclasses.
GroupFetchScanController: This scan controller can only be used for group fetch, no update operations are supported, use ScanController if you need scan interfaces other than group fetch. In general group fetch will be more efficient than using the ScanController fetchNext() interface to get rows one at a time. The performance comes from reducing the per call overhead of getting a row. Also this interface can, depending on the requested isolation level, possibly do more efficient locking. Group fetch scans are opened from a TransactionController.
| Home | Contact Us | Privacy Policy | Terms of Service |