Storage.EntryType| Constructor and Description |
|---|
BtreeStorage(java.lang.String name)
Create a BtreeStorage object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the btree repository.
|
void |
commitChanges()
Save all objects changed since this method was last call.
|
void |
create(boolean replace,
ObjectResolver resolver)
Create btree repository
|
MultivaluedIndex |
createMultivaluedIndex(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType valueType,
boolean unique)
Create index that hold a set of values for each key.
|
MultivaluedOrderedIndex |
createMultivaluedOrderedIndex(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType valueType,
boolean unique)
Create index that holds sorted set of values for each key.
|
SinglevaluedIndex |
createSinglevaluedIndex(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType valueType)
Create index that holds exactly one value for each key.
|
boolean |
delete()
delete the btree repository.
|
void |
dropIndex(java.lang.String name)
Delete index.
|
boolean |
exists()
determine if the btree currently exists
|
Index |
getIndex(java.lang.String name)
Retrieve index by name.
|
byte[] |
getMOFIDData(MOFID mofid) |
MofidGenerator |
getMofidGenerator()
Return the MOFID generator for this repository
|
java.util.Map |
getMofidMap()
Return the map of MOFID UUIDs we know about
|
MultivaluedIndex |
getMultivaluedIndex(java.lang.String name)
Retrieve index by name.
|
MultivaluedOrderedIndex |
getMultivaluedOrderedIndex(java.lang.String name)
Retrieve index by name.
|
java.lang.String |
getName()
Return our name
|
SinglevaluedIndex |
getPrimaryIndex()
Return the primary index (the BtreeDatabase)
|
long |
getSerialNumber() |
SinglevaluedIndex |
getSinglevaluedIndex(java.lang.String name)
Retrieve index by name.
|
java.lang.String |
getStorageId()
Returns storage id
|
java.lang.String |
numberToStorageId(int number)
Resolves external storage number coded by an integer.
|
void |
objectStateChanged(java.lang.Object key)
Notify the Storage that state of the object was changed.
|
void |
objectStateWillChange(java.lang.Object key)
Notify the Storage that state of the object will be changed.
|
void |
open(boolean createIfNoExist,
ObjectResolver resolver)
Open a btree MDR
|
MOFID |
readMOFID(java.io.InputStream inputStream)
Reads a MOFID from Storage, must be called in the
streamable read context.
|
MOFID |
readMOFIDData(java.io.InputStream in) |
java.lang.Object |
resolveObject(MOFID key)
Delegates resolving of external mof ids on the object resolver.
|
void |
rollBackChanges()
Discard all changes since commitChanges() method was last called.
|
void |
shutDown()
Shutdowns btree databes (i.e.
|
int |
storageIdToNumber(java.lang.String storageId)
Maps an external storage prefix to integer.
|
boolean |
supportsMultipleStorableIndexes()
Returns true if the storage supports more than one index with type
Entrytype.STREAMABLE |
void |
writeMOFID(java.io.OutputStream outputStream,
MOFID mofId)
Writes a MOFID into Storage, must be called in the
streamable write context.
|
void |
writeMOFIDData(java.io.OutputStream out,
MOFID mofid) |
public BtreeStorage(java.lang.String name)
name - the name of the btree. This will be the base name
for the btree filespublic java.lang.String getName()
public java.lang.String getStorageId()
getStorageId in interface Storagepublic long getSerialNumber()
getSerialNumber in interface Storagepublic boolean exists()
public boolean delete()
throws StorageException
delete in interface StorageStorageExceptionpublic void create(boolean replace,
ObjectResolver resolver)
throws StorageException
create in interface Storagereplace - whether to replace an existing repositoryStorageException - on any error creating the repositorypublic void open(boolean createIfNoExist,
ObjectResolver resolver)
throws StorageException
open in interface StoragecreateIfNoExist - whether to create the repository if it
doesn't existStorageException - on any error opening or creating
the repositorypublic void close()
throws StorageException
close in interface StorageStorageExceptionpublic SinglevaluedIndex getPrimaryIndex() throws StorageException
getPrimaryIndex in interface StorageStorageExceptionpublic SinglevaluedIndex createSinglevaluedIndex(java.lang.String name, Storage.EntryType keyType, Storage.EntryType valueType) throws StorageException
createSinglevaluedIndex in interface Storagename - name of the indexkeyType - type of keys in the indexvalueType - type of values in the indexStorageExceptionpublic MultivaluedOrderedIndex createMultivaluedOrderedIndex(java.lang.String name, Storage.EntryType keyType, Storage.EntryType valueType, boolean unique) throws StorageException
createMultivaluedOrderedIndex in interface Storagename - name of the indexkeyType - type of keys in the indexvalueType - type of values in the indexunique - true if values associated with one key do not contain duplicatesStorageExceptionpublic MultivaluedIndex createMultivaluedIndex(java.lang.String name, Storage.EntryType keyType, Storage.EntryType valueType, boolean unique) throws StorageException
createMultivaluedIndex in interface Storagename - name of the indexkeyType - type of keys in the indexvalueType - type of values in the indexunique - true if values associated with one key do not contain duplicatesStorageExceptionpublic Index getIndex(java.lang.String name) throws StorageException
getIndex in interface Storagename - name of the indexStorageExceptionpublic SinglevaluedIndex getSinglevaluedIndex(java.lang.String name) throws StorageException
getSinglevaluedIndex in interface Storagename - name of the indexStorageExceptionpublic MultivaluedIndex getMultivaluedIndex(java.lang.String name) throws StorageException
getMultivaluedIndex in interface Storagename - name of the indexStorageExceptionpublic MultivaluedOrderedIndex getMultivaluedOrderedIndex(java.lang.String name) throws StorageException
getMultivaluedOrderedIndex in interface Storagename - name of the indexStorageExceptionpublic void dropIndex(java.lang.String name)
throws StorageException
dropIndex in interface Storagename - name of the indexStorageExceptionpublic void objectStateWillChange(java.lang.Object key)
throws StorageException
objectStateWillChange in interface Storagekey - key of object that will be changedStorageExceptionpublic void objectStateChanged(java.lang.Object key)
throws StorageException
objectStateChanged in interface Storagekey - key of object that was changedStorageExceptionpublic void commitChanges()
throws StorageException
commitChanges in interface StorageStorageExceptionpublic void rollBackChanges()
throws StorageException
rollBackChanges in interface StorageStorageExceptionpublic void shutDown()
throws StorageException
shutDown in interface StorageStorageExceptionpublic boolean supportsMultipleStorableIndexes()
Entrytype.STREAMABLEEntrytype.STREAMABLEpublic void writeMOFID(java.io.OutputStream outputStream,
MOFID mofId)
throws StorageException
StoragewriteMOFID in interface StorageStorageExceptionpublic final void writeMOFIDData(java.io.OutputStream out,
MOFID mofid)
throws StorageException
StorageExceptionpublic final byte[] getMOFIDData(MOFID mofid) throws StorageException
StorageExceptionpublic MOFID readMOFID(java.io.InputStream inputStream) throws StorageException
StoragereadMOFID in interface StorageStorageExceptionpublic final MOFID readMOFIDData(java.io.InputStream in) throws StorageException
StorageExceptionpublic MofidGenerator getMofidGenerator()
public java.util.Map getMofidMap()
public int storageIdToNumber(java.lang.String storageId)
throws StorageException
StorageExceptionpublic java.lang.String numberToStorageId(int number)
throws StorageException
StorageExceptionpublic java.lang.Object resolveObject(MOFID key) throws StorageException
StorageExceptionCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.