org.apache.openjpa.writebehind
Class WriteBehindStoreManager
java.lang.Object
org.apache.openjpa.kernel.DelegatingStoreManager
org.apache.openjpa.writebehind.WriteBehindStoreManager
- All Implemented Interfaces:
- StoreManager, Closeable
public class WriteBehindStoreManager
- extends DelegatingStoreManager
Methods inherited from class org.apache.openjpa.kernel.DelegatingStoreManager |
assignField, assignObjectId, beforeStateChange, begin, beginOptimistic, cancelAll, close, compareVersion, copyDataStoreId, equals, executeExtent, exists, getClientConnection, getDataStoreIdSequence, getDataStoreIdType, getDelegate, getInnermostDelegate, getManagedType, getValueSequence, hashCode, initialize, load, loadAll, newDataStoreId, newFetchConfiguration, newQuery, releaseConnection, retainConnection, rollbackOptimistic, setContext, syncVersion |
includedTypes
protected Set<Class<?>> includedTypes
excludedTypes
protected Set<Class<?>> excludedTypes
_cacheInserts
protected boolean _cacheInserts
_cacheUpdates
protected boolean _cacheUpdates
_cacheDeletes
protected boolean _cacheDeletes
OP_INSERT
public static final int OP_INSERT
- See Also:
- Constant Field Values
OP_DELETE
public static final int OP_DELETE
- See Also:
- Constant Field Values
OP_UPDATE
public static final int OP_UPDATE
- See Also:
- Constant Field Values
WriteBehindStoreManager
public WriteBehindStoreManager(StoreManager store)
WriteBehindStoreManager
public WriteBehindStoreManager(StoreManager store,
WriteBehindCache wbCache)
flush
public Collection<Exception> flush(Collection<OpenJPAStateManager> sms)
- Description copied from interface:
StoreManager
- Flush the given state manager collection to the datastore, returning
a collection of exceptions encountered during flushing.
The given collection may include states that do not require data
store action, such as persistent-clean instances or persistent-dirty
instances that have not been modified since they were last flushed.
For datastore updates and inserts, the dirty, non-flushed fields of
each state should be flushed. New instances without an assigned object
id should be given one via
OpenJPAStateManager.setObjectId(java.lang.Object)
. New
instances with value-strategy fields that have not been assigned yet
should have their fields set. Datastore version information should be
updated during flush, and the state manager's version indicator
updated through the OpenJPAStateManager.setNextVersion(java.lang.Object)
method.
The current version will roll over to this next version upon successful
commit.
- Specified by:
flush
in interface StoreManager
- Overrides:
flush
in class DelegatingStoreManager
- See Also:
org.apache.openjpa.util.ApplicationIds#assign()
commit
public void commit()
- Description copied from interface:
StoreManager
- Commit the current data store transaction.
- Specified by:
commit
in interface StoreManager
- Overrides:
commit
in class DelegatingStoreManager
rollback
public void rollback()
- Description copied from interface:
StoreManager
- Rollback the current data store transaction.
- Specified by:
rollback
in interface StoreManager
- Overrides:
rollback
in class DelegatingStoreManager
flushBehind
public Collection<Exception> flushBehind(Collection<OpenJPAStateManager> sms)
cacheAble
public boolean cacheAble(OpenJPAStateManager sm)
getOperation
protected int getOperation(OpenJPAStateManager sm)
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.