public abstract class AbstractPersistenceHandler extends Object implements StorePersistenceHandler
StorePersistenceHandler.PersistenceBatchType| 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,
StorePersistenceHandler.PersistenceBatchType type)
Signal that the current batch of operations are ending for the specified ExecutionContext.
|
void |
batchStart(ExecutionContext ec,
StorePersistenceHandler.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, waitclose, deleteObject, fetchObject, findObject, insertObject, locateObject, updateObjectprotected StoreManager storeMgr
public AbstractPersistenceHandler(StoreManager storeMgr)
public void batchStart(ExecutionContext ec, StorePersistenceHandler.PersistenceBatchType batchType)
StorePersistenceHandlerbatchStart in interface StorePersistenceHandlerec - The ExecutionContextbatchType - Type of this batch that is startingpublic void batchEnd(ExecutionContext ec, StorePersistenceHandler.PersistenceBatchType type)
StorePersistenceHandlerbatchEnd in interface StorePersistenceHandlerec - The ExecutionContexttype - Type of batch that is endingpublic void insertObjects(ObjectProvider... ops)
StorePersistenceHandlerinsertObjects in interface StorePersistenceHandlerops - ObjectProviders for the objects to insertpublic void deleteObjects(ObjectProvider... ops)
StorePersistenceHandlerdeleteObjects in interface StorePersistenceHandlerops - 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 StorePersistenceHandlerops - 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 StorePersistenceHandlerec - 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 © 2018. All rights reserved.