Skip navigation links
org.openidentityplatform.commons.parent 2.2.3 Documentation

Package com.persistit

Implements Persistit™'s core functionality.

See: Description

Package com.persistit Description

Implements Persistit™'s core functionality.

Applications initialize and close Persistit through an instance of the Persistit class. A Persistit instance must be initialized through one of the initialize methods, and must be closed by the close to ensure all updates are written to disk.

Applications interact with Persistit through instances of Exchange. An Exchange has two important associated member objects, a Key and a 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:

  1. Modify the Key, perform a fetch operation, and query the Value.
  2. Modify the Key, modify the Value, and then perform a store operation to insert or replace data in the database.
  3. Modify the Key, and then perform a remove to remove one or more key/value pairs.
  4. Optionally modify the Key, perform a traverse, next or previous, then query the resulting state of Key and/or Value to enumerate key/value pairs currently stored in the database.

Additional methods of Exchange include fetchAndStore and fetchAndRemove. These atomically modify the database and return the former value associated with the Key.

Every Exchange has an associated 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 methods behave as if the bounded by begin commit and end calls on the Transaction. An application can group multiple operations together by explicitly invoking begin, commit and end calls. See Transaction for further information.

The Persistit database is stored in physical files managed by Volumes. A Volume contains an unbounded number of logical Trees, each of which constitutes a physical balanced tree.

IntegrityCheck provides a simple mechanism to verify the internal integrity of Volumes and/or individual Trees.

This package also includes PersistitMap which provides a persistent, fast implementation of java.util.SortedMap.

Finally, an application can obtain an instance of a Management object that exposes an API for measuring performance data, sizes and utilization of database volumes, and many other elements from the Persistit.getManagement() method. Optionally this class can be exported via Java RMI (Remote Method Invocation) to permit administration from a connected workstation.

Skip navigation links
org.openidentityplatform.commons.parent 2.2.3 Documentation

Copyright © 2025 Open Identity Platform Community. All rights reserved.