public class HDLCalculatedStorage
extends java.lang.Object
implements net.handle.hdllib.HandleStorage
| Constructor and Description |
|---|
HDLCalculatedStorage() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkpointDatabase()
Copy the current database to a backup file, and restart the transaction log.
|
void |
createHandle(byte[] inHandle,
net.handle.hdllib.HandleValue[] values)
Creates the specified handle in the "database" with the specified
initial values
|
void |
deleteAllRecords()
Remove all of the records from the database.
|
boolean |
deleteHandle(byte[] inHandle)
Delete the specified handle in the database.
|
void |
finalize() |
java.util.Enumeration |
getHandlesForNA(byte[] naHdl)
Scan the database for handles with the given naming authority
and return an Enumeration of byte arrays with each byte array
being a handle.
|
byte[][] |
getRawHandleValues(byte[] inHandle,
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 naming
authority.
|
void |
init(net.cnri.util.StreamTable config)
Initialize the JDB handle database with the given configuration.
|
void |
scanHandles(net.handle.hdllib.ScanCallback callback)
Scan the database, calling a method in the specified callback for
every handle in the database.
|
void |
scanNAs(net.handle.hdllib.ScanCallback callback)
Scan the NA database, calling a method in the specified callback for
every naming authority handle in the database.
|
void |
setHaveNA(byte[] authHandle,
boolean flag)
Sets a flag indicating whether or not this server is responsible
for the given naming authority.
|
void |
shutdown()
Close the database and clean up
|
void |
updateValue(byte[] inHandle,
net.handle.hdllib.HandleValue[] values)
Replace the current values for the given handle with new values.
|
public HDLCalculatedStorage()
throws java.lang.Exception
java.lang.Exceptionpublic void init(net.cnri.util.StreamTable config)
init in interface net.handle.hdllib.HandleStoragepublic final boolean haveNA(byte[] authHandle)
throws net.handle.hdllib.HandleException
haveNA in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final void setHaveNA(byte[] authHandle,
boolean flag)
throws net.handle.hdllib.HandleException
setHaveNA in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final byte[][] getRawHandleValues(byte[] inHandle,
int[] indexList,
byte[][] typeList)
throws net.handle.hdllib.HandleException
getRawHandleValues in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final void createHandle(byte[] inHandle,
net.handle.hdllib.HandleValue[] values)
throws net.handle.hdllib.HandleException
createHandle in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final boolean deleteHandle(byte[] inHandle)
throws net.handle.hdllib.HandleException
deleteHandle in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final void updateValue(byte[] inHandle,
net.handle.hdllib.HandleValue[] values)
throws net.handle.hdllib.HandleException
updateValue in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final void scanHandles(net.handle.hdllib.ScanCallback callback)
throws net.handle.hdllib.HandleException
scanHandles in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic void scanNAs(net.handle.hdllib.ScanCallback callback)
throws net.handle.hdllib.HandleException
scanNAs in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final java.util.Enumeration getHandlesForNA(byte[] naHdl)
throws net.handle.hdllib.HandleException
getHandlesForNA in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final void deleteAllRecords()
throws net.handle.hdllib.HandleException
deleteAllRecords in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final void checkpointDatabase()
throws net.handle.hdllib.HandleException
checkpointDatabase in interface net.handle.hdllib.HandleStoragenet.handle.hdllib.HandleExceptionpublic final void shutdown()
shutdown in interface net.handle.hdllib.HandleStoragepublic void finalize()
finalize in class java.lang.Object