Implements Persistit™'s core functionality.
Applications initialize and close Persistit using the static {@link com.persistit.Persistit#initialize initialize} and {@link com.persistit.Persistit#close close} methods of {@link com.persistit.Persistit}.
Applications interact with Persistit through instances of {@link com.persistit.Exchange}. An Exchange has two important associated member objects, a {@link com.persistit.Key} and a {@link com.persistit.Value}. A Key is a mutable representation of a key, and a Value is a mutable representation of a value. Applications manipulate these objects and interact with the database through one of the following four general patterns:
Additional methods of Exchange include {@link com.persistit.Exchange#fetchAndStore fetchAndStore} and {@link com.persistit.Exchange#fetchAndRemove fetchAndRemove}. These atomically modify the database and return the former value associated with the Key.
Every Exchange has an associated {@link com.persistit.Transaction Transaction} object that represents its current transactional state. Every operation performed by any of the access or update methods of the Exchange is performed within the context of this Transaction, meaning that its result is atomic, consistent, isolated and durable (the ACID properties). By default these mthods behave as if the bounded by {@link com.persistit.Transaction#begin begin} {@link com.persistit.Transaction#commit commit} and {@link com.persistit.Transaction#end end} calls on the Transaction. An application can group multiple operations together by explicitly invoking begin, commit and end calls. See {@link com.persistit.Transaction} for further information.
The Persistit database is stored in physical files managed by {@link com.persistit.Volume Volume}s. A Volume contains an unbounded number of logical {@link com.persistit.Tree Tree}s, each of which constitutes a physical balanced tree.
{@link com.persistit.IntegrityCheck IntegrityCheck} provides a simple mechanism to verify the internal integrity of Volumes and/or individual Trees.
This package also includes {@link com.persistit.PersistitMap PersistitMap} and {@link com.persistit.PersistitIndexedSet}. PersistitMap provides a persistent, fast implementation of java.util.SortedMap. PersistitIndexedSet associates objects with unique persistent object identitifiers. To be useful in a PersistitIndexedSet, an object must be encodable as a key, meaning either that it is one of the classes for which built-in key encoding is supported (such as java.lang.String) or it has a registered {@link com.persistit.encoding.KeyCoder}.
Finally, an application can obtain an instance of a {@link com.persistit.Management} object that exposes an API for measuring performance data, sizes and utilization of database volumes, and many other elements from the {@link com.persistit.Persistit#getManagement} method. Optionally this class can be exported via Java RMI (Remote Method Invocation) to permit administration from a connected workstation.