|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectequip.data.MemoryDataStore
equip.data.FileBackedMemoryDataStore
Like MemoryDataStore, but attempts to persist dataspace
contents through use of checkpoint and event log files.
See notes for DataDelegate for configuring a dataspace
to make use of a custom data store such as this. Note that you should
probably also fix the responsible ID for the DataDelegate.
Configuration:
STOREID.path: DIRECTORYPATH [default "." - will use/create STOREID subdirectory] STOREID.checkpointEventCount: EVENTS-BETWEEN-CHECKPOINTS [default 1000] STOREID.maxFlushIntervalS: MAX-TIME-BETWEE-EVENTS-FLUSH [default 10, 0 to flush every event] STOREID.writeProcessBound: T/F [default T] STOREID.writePureEvents: T/F [default T] STOREID.restoreProcessBound: T/F [default F - don't enable this unless you are really sure :-)]
Files/formats. All files are in the STOREID subdirectory of the STOREID.path.
| Nested Class Summary |
| Nested classes inherited from class equip.data.MemoryDataStore |
MemoryDataStore.LeasedItem |
| Field Summary | |
static java.lang.String |
CHECKPOINT_HEADER
|
static java.lang.String |
CHECKPOINT_PREFIX
|
static java.lang.String |
CHECKPOINT_SUFFIX
|
static int |
CHECKPOINT_VERSION
|
static java.lang.String |
EVENTS_HEADER
|
static java.lang.String |
EVENTS_PREFIX
|
static java.lang.String |
EVENTS_SUFFIX
|
static int |
EVENTS_VERSION
|
static int |
MIN_CHECKPOINT_VERSION
|
static int |
MIN_EVENTS_VERSION
|
static java.lang.String |
TEMP_SUFFIX
|
| Fields inherited from class equip.data.MemoryDataStore |
idMap, leasedItems, parentMultimap |
| Constructor Summary | |
FileBackedMemoryDataStore(java.lang.String storeId,
GUID responsible)
|
|
| Method Summary | |
void |
flush()
Flush any pending persistent records |
boolean |
handleAdd(AddEvent add)
request that store handle the Add event, adding to itself accordingly. |
boolean |
handleDelete(DeleteEvent del)
request that store handles the given delete, which it must iff it is currently maintaining state for the corresponding data item. |
boolean |
handleUpdate(UpdateEvent upd)
request that store handles the given update, which it must iff it is currently maintaining state for it. |
void |
terminate()
terminate - tidy up. |
| Methods inherited from class equip.data.MemoryDataStore |
checkAdd, getCandidateItemBindings, getExpiredGUIDs, getFirstExpireTime, getItemBinding, getRemoveResponsibleGUIDs, holdsGUID, removeParent, truncateExpireTimes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CHECKPOINT_PREFIX
public static final java.lang.String CHECKPOINT_SUFFIX
public static final java.lang.String TEMP_SUFFIX
public static final java.lang.String EVENTS_PREFIX
public static final java.lang.String EVENTS_SUFFIX
public static final java.lang.String CHECKPOINT_HEADER
public static final int CHECKPOINT_VERSION
public static final int MIN_CHECKPOINT_VERSION
public static final java.lang.String EVENTS_HEADER
public static final int EVENTS_VERSION
public static final int MIN_EVENTS_VERSION
| Constructor Detail |
public FileBackedMemoryDataStore(java.lang.String storeId,
GUID responsible)
throws DataStoreConfigurationException
| Method Detail |
public boolean handleAdd(AddEvent add)
handleAdd in interface IDataStorehandleAdd in class MemoryDataStoreadd - The AddEvent to be handled.
IDataStore.checkAddpublic boolean handleUpdate(UpdateEvent upd)
handleUpdate in interface IDataStorehandleUpdate in class MemoryDataStoreupd - the UpdateEvent to be handled.
public boolean handleDelete(DeleteEvent del)
handleDelete in interface IDataStorehandleDelete in class MemoryDataStorepublic void terminate()
terminate in interface IDataStoreterminate in class MemoryDataStorepublic void flush()
flush in interface IDataStoreflush in class MemoryDataStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||