public interface Storage
Storage.Entrytype.| Modifier and Type | Interface and Description |
|---|---|
static class |
Storage.EntryType
Type of values and keys stored in index.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commitChanges()
Save all objects changed since this method was last call.
|
void |
create(boolean replace,
ObjectResolver resolver) |
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 any persistent resources associated with the Storage.
|
void |
dropIndex(java.lang.String name)
Delete index.
|
boolean |
exists() |
Index |
getIndex(java.lang.String name)
Retrieve index by name.
|
MultivaluedIndex |
getMultivaluedIndex(java.lang.String name)
Retrieve index by name.
|
MultivaluedOrderedIndex |
getMultivaluedOrderedIndex(java.lang.String name)
Retrieve index by name.
|
java.lang.String |
getName() |
SinglevaluedIndex |
getPrimaryIndex()
Returns the primary index in this Storage.
|
long |
getSerialNumber() |
SinglevaluedIndex |
getSinglevaluedIndex(java.lang.String name)
Retrieve index by name.
|
java.lang.String |
getStorageId() |
void |
objectStateChanged(java.lang.Object key)
Notify the Storage that state of the object associated with this key
was changed.
|
void |
objectStateWillChange(java.lang.Object key)
Notify the Storage that state of the object associated with this key
will be changed.
|
void |
open(boolean createOnNoExist,
ObjectResolver resolver) |
MOFID |
readMOFID(java.io.InputStream inputStream)
Reads a MOFID from Storage, must be called in the
streamable read context.
|
void |
rollBackChanges()
Discard all changes since commitChanges() method was last call.
|
void |
shutDown()
Performs operations needed on exit.
|
void |
writeMOFID(java.io.OutputStream outputStream,
MOFID mofid)
Writes a MOFID into Storage, must be called in the
streamable write context.
|
java.lang.String getName()
java.lang.String getStorageId()
long getSerialNumber()
MOFID readMOFID(java.io.InputStream inputStream) throws StorageException
StorageExceptionvoid writeMOFID(java.io.OutputStream outputStream,
MOFID mofid)
throws StorageException
MOFID - mofid, object to be writtenStorageExceptionSinglevaluedIndex getPrimaryIndex() throws StorageException
StorageExceptionboolean exists()
throws StorageException
StorageExceptionboolean delete()
throws StorageException
StorageExceptionvoid create(boolean replace,
ObjectResolver resolver)
throws StorageException
StorageExceptionvoid open(boolean createOnNoExist,
ObjectResolver resolver)
throws StorageException
StorageExceptionvoid close()
throws StorageException
StorageExceptionSinglevaluedIndex createSinglevaluedIndex(java.lang.String name, Storage.EntryType keyType, Storage.EntryType valueType) throws StorageException
name - name of the indexkeyType - type of keys in the indexvalueType - type of values in the index (any type except STREAMABLE)StorageExceptionMultivaluedOrderedIndex createMultivaluedOrderedIndex(java.lang.String name, Storage.EntryType keyType, Storage.EntryType valueType, boolean unique) throws StorageException
name - name of the indexkeyType - type of keys in the indexvalueType - type of values in the index (any type except STREAMABLE)unique - true if values associated with one key do not contain duplicatesStorageExceptionMultivaluedIndex createMultivaluedIndex(java.lang.String name, Storage.EntryType keyType, Storage.EntryType valueType, boolean unique) throws StorageException
name - name of the indexkeyType - type of keys in the indexvalueType - type of values in the index (any type except STREAMABLE)unique - true if values associated with one key do not contain duplicatesStorageExceptionIndex getIndex(java.lang.String name) throws StorageException
name - name of the indexStorageExceptionSinglevaluedIndex getSinglevaluedIndex(java.lang.String name) throws StorageException
name - name of the indexStorageExceptionMultivaluedIndex getMultivaluedIndex(java.lang.String name) throws StorageException
name - name of the indexStorageExceptionMultivaluedOrderedIndex getMultivaluedOrderedIndex(java.lang.String name) throws StorageException
name - name of the indexStorageExceptionvoid dropIndex(java.lang.String name)
throws StorageException
name - name of the indexStorageExceptionvoid objectStateWillChange(java.lang.Object key)
throws StorageException
objectStateChanged(java.lang.Object))
is supposed to be precedesed by this notification.key - key of the object that will be changedStorageExceptionvoid objectStateChanged(java.lang.Object key)
throws StorageException
key - key of the object that was changed and must be savedStorageExceptionvoid commitChanges()
throws StorageException
StorageExceptionvoid rollBackChanges()
throws StorageException
StorageExceptionvoid shutDown()
throws StorageException
StorageExceptionCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.