HandleStorage2public interface HandleStorage
| Modifier and Type | Method | Description |
|---|---|---|
void |
checkpointDatabase() |
Checkpoint (ie backup, and reset transaction logs) the database.
|
void |
createHandle(byte[] handle,
HandleValue[] values) |
Creates the specified handle in the "database" with the specified
initial values
|
default void |
createOrUpdateRecord(byte[] handle,
HandleValue[] values) |
Creates or updates the handle to have the exact given handle values.
|
void |
deleteAllRecords() |
Remove all of the records from the database.
|
boolean |
deleteHandle(byte[] handle) |
Delete the specified handle in the database.
|
default boolean |
exists(byte[] handle) |
Returns true if the given handle exists in the database.
|
java.util.Enumeration<byte[]> |
getHandlesForNA(byte[] naHdl) |
Scan the database for handles with the given prefix
and return an Enumeration of byte arrays with each byte array
being a handle.
|
byte[][] |
getRawHandleValues(byte[] handle,
int[] indexList,
byte[][] typeList) |
Return the pre-packaged values of the given handle that are either
in the indexList or the typeList.
|
boolean |
haveNA(byte[] authHandle) |
Returns true if this server is responsible for the given prefix.
|
void |
init(net.cnri.util.StreamTable configTable) |
Initializes the handle storage object with the given configuration
table.
|
void |
scanHandles(ScanCallback callback) |
Scan the database, calling a method in the specified callback for
every handle in the database.
|
default void |
scanHandlesFrom(byte[] startingPoint,
boolean inclusive,
ScanCallback callback) |
Scan the database, calling a method in the specified callback for
every handle in the database.
|
void |
scanNAs(ScanCallback callback) |
Scan the homed prefix database, calling a method in the
specified callback for every prefix in the database.
|
default void |
scanNAsFrom(byte[] startingPoint,
boolean inclusive,
ScanCallback callback) |
Scan the homed prefix database, calling a method in the
specified callback for every prefix in the database.
|
void |
setHaveNA(byte[] authHandle,
boolean flag) |
Sets a flag indicating whether or not this server is responsible
for the given prefix.
|
void |
shutdown() |
Save pending data and close any open files.
|
default boolean |
supportsDumpResumption() |
Returns true if
scanHandlesFrom(byte[], boolean, ScanCallback) and
scanNAsFrom(byte[], boolean, ScanCallback) are implemented;
otherwise false. |
void |
updateValue(byte[] handle,
HandleValue[] value) |
Replace the handle value that has the same index as the given handle
value with the given handle value.
|
void init(net.cnri.util.StreamTable configTable) throws java.lang.Exception
java.lang.Exceptionboolean haveNA(byte[] authHandle)
throws HandleException
HandleExceptionvoid setHaveNA(byte[] authHandle,
boolean flag)
throws HandleException
HandleExceptionvoid createHandle(byte[] handle,
HandleValue[] values)
throws HandleException
HandleExceptionboolean deleteHandle(byte[] handle)
throws HandleException
HandleExceptionbyte[][] getRawHandleValues(byte[] handle,
int[] indexList,
byte[][] typeList)
throws HandleException
HandleExceptionvoid updateValue(byte[] handle,
HandleValue[] value)
throws HandleException
HandleExceptionvoid scanHandles(ScanCallback callback) throws HandleException
HandleExceptionvoid scanNAs(ScanCallback callback) throws HandleException
HandleExceptionjava.util.Enumeration<byte[]> getHandlesForNA(byte[] naHdl)
throws HandleException
HandleExceptionvoid deleteAllRecords()
throws HandleException
HandleExceptionvoid checkpointDatabase()
throws HandleException
HandleExceptionvoid shutdown()
default boolean supportsDumpResumption()
scanHandlesFrom(byte[], boolean, ScanCallback) and
scanNAsFrom(byte[], boolean, ScanCallback) are implemented;
otherwise false.default void scanHandlesFrom(byte[] startingPoint,
boolean inclusive,
ScanCallback callback)
throws HandleException
HandleExceptiondefault void scanNAsFrom(byte[] startingPoint,
boolean inclusive,
ScanCallback callback)
throws HandleException
HandleExceptiondefault boolean exists(byte[] handle)
throws HandleException
HandleExceptiondefault void createOrUpdateRecord(byte[] handle,
HandleValue[] values)
throws HandleException
HandleException