public abstract class AbstractPersistenceHandler extends Object implements StorePersistenceHandler
Modifier and Type | Field and Description |
---|---|
protected StoreManager |
storeMgr |
Constructor and Description |
---|
AbstractPersistenceHandler(StoreManager storeMgr) |
Modifier and Type | Method and Description |
---|---|
void |
assertReadOnlyForUpdateOfObject(ObjectProvider op)
Convenience method to assert when this StoreManager is read-only and the specified object
is attempting to be updated.
|
void |
batchEnd(ExecutionContext ec,
PersistenceBatchType type)
Signal that the current batch of operations are ending for the specified ExecutionContext.
|
void |
batchStart(ExecutionContext ec,
PersistenceBatchType batchType)
Signal that a batch of operations are starting for the specified ExecutionContext.
|
void |
deleteObjects(ObjectProvider... ops)
Method to delete an array of objects from the datastore.
|
Object[] |
findObjects(ExecutionContext ec,
Object[] ids)
Simple implementation of find of multiple objects, relaying the find for each object
to
|
void |
insertObjects(ObjectProvider... ops)
Method to insert an array of objects to the datastore.
|
void |
locateObjects(ObjectProvider[] ops)
Simple implementation of location of multiple objects, relaying the locate check for each object
to
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, deleteObject, fetchObject, findObject, insertObject, locateObject, updateObject
protected StoreManager storeMgr
public AbstractPersistenceHandler(StoreManager storeMgr)
public void batchStart(ExecutionContext ec, PersistenceBatchType batchType)
StorePersistenceHandler
batchStart
in interface StorePersistenceHandler
ec
- The ExecutionContextbatchType
- Type of this batch that is startingpublic void batchEnd(ExecutionContext ec, PersistenceBatchType type)
StorePersistenceHandler
batchEnd
in interface StorePersistenceHandler
ec
- The ExecutionContexttype
- Type of batch that is endingpublic void insertObjects(ObjectProvider... ops)
StorePersistenceHandler
insertObjects
in interface StorePersistenceHandler
ops
- ObjectProviders for the objects to insertpublic void deleteObjects(ObjectProvider... ops)
StorePersistenceHandler
deleteObjects
in interface StorePersistenceHandler
ops
- ObjectProviders for the objects to deletepublic void locateObjects(ObjectProvider[] ops)
locateObject. Should be overridden by the datastore implementation if it is possible to do bulk locates.
locateObjects
in interface StorePersistenceHandler
ops
- ObjectProviders for the objects to locateNucleusObjectNotFoundException
- if an object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationpublic Object[] findObjects(ExecutionContext ec, Object[] ids)
findObject. Should be overridden by the datastore implementation if it is possible to do bulk retrieval.
findObjects
in interface StorePersistenceHandler
ec
- execution contextids
- identities of the object(s) to retrieveids)
NucleusObjectNotFoundException
- if an object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationpublic void assertReadOnlyForUpdateOfObject(ObjectProvider op)
op
- ObjectProvider for the objectCopyright © 2017. All rights reserved.