public abstract class AbstractStorage<T,C extends StorageConf> extends Object implements Storage<T,C>
| Constructor and Description |
|---|
AbstractStorage() |
| Modifier and Type | Method and Description |
|---|---|
protected List<StorageCallback> |
getPostStoreCallbacks(T object) |
protected List<StorageCallback> |
getPreStoreCallbacks(T object) |
boolean |
isStarted() |
void |
registerPostStoreCallback(T object,
StorageCallback callback)
Registers a callback which is executed right after
object is
stored with Storage.store(java.lang.Object). |
void |
registerPreStoreCallback(T object,
StorageCallback callback)
Registers a callback which is executed right before
object is
stored with Storage.store(java.lang.Object). |
void |
start()
Starts referenced resources.
|
public void start()
throws StorageCreationException
Storagestart in interface Storage<T,C extends StorageConf>StorageCreationException - wraps any exception which occurs during the creation of this storagepublic boolean isStarted()
isStarted in interface Storage<T,C extends StorageConf>public void registerPostStoreCallback(T object, StorageCallback callback) throws StorageException
Storageobject is
stored with Storage.store(java.lang.Object).
Note that entities are supposed to be equals in all persistent entity
states transient, attached, detached and removedhttps://vladmihalcea.com/2014/07/30/a-beginners-guide-to-jpahibernate-entity-state-transitions/
and if they're not this method will explicitly has undefined behaviour.registerPostStoreCallback in interface Storage<T,C extends StorageConf>object - the object the callback ought to be registered forcallback - the callback to registerStorageException - wraps any exception occuring during storageprotected List<StorageCallback> getPostStoreCallbacks(T object)
public void registerPreStoreCallback(T object, StorageCallback callback) throws StorageException
Storageobject is
stored with Storage.store(java.lang.Object).
Note that entities are supposed to be equals in all persistent entity
states transient, attached, detached and removedhttps://vladmihalcea.com/2014/07/30/a-beginners-guide-to-jpahibernate-entity-state-transitions/
and if they're not this method will explicitly has undefined behaviour.registerPreStoreCallback in interface Storage<T,C extends StorageConf>object - the object the callback ought to be registered forcallback - the callback to registerStorageException - wraps any exception occuring during storageprotected List<StorageCallback> getPreStoreCallbacks(T object)
Copyright © 2018. All rights reserved.