org.apache.openjpa.slice
public class DistributedBrokerImpl extends FinalizingBrokerImpl implements DistributedBroker
FLUSH_COMMIT, FLUSH_INC, FLUSH_LOGICAL, FLUSH_ROLLBACKEXCLUDE_ALL, OID_ALLOW_NEW, OID_COPY, OID_NODELETED, OID_NOVALIDATECONN_RETAIN_ALWAYS, CONN_RETAIN_DEMAND, CONN_RETAIN_TRANSDETACH_ALL, DETACH_FETCH_GROUPS, DETACH_FGS, DETACH_LOADEDLOCK_NONE, LOCK_READ, LOCK_WRITERESTORE_ALL, RESTORE_IMMUTABLE, RESTORE_NONECLEAR_ALL, CLEAR_DATASTOREDETACH_CLOSE, DETACH_COMMIT, DETACH_NONTXREAD, DETACH_ROLLBACKCALLBACK_FAIL_FAST, CALLBACK_IGNORE, CALLBACK_LOG, CALLBACK_RETHROW, CALLBACK_ROLLBACK| Constructor and Description |
|---|
DistributedBrokerImpl() |
| Modifier and Type | Method and Description |
|---|---|
Slice |
addSlice(java.lang.String name,
java.util.Map properties)
Adds the given slice with the given properties.
|
void |
beginStore()
A virtual datastore need not be opened.
|
boolean |
endOperation()
Mark the operation over.
|
DistributedConfiguration |
getConfiguration()
Return the configuration associated with this context.
|
DistributedStoreManager |
getDistributedStoreManager() |
void |
lock()
Always uses lock irrespective of super's multi-threaded settings.
|
protected QueryImpl |
newQueryImpl(java.lang.String lang,
StoreQuery sq)
Create a new query.
|
OpenJPAStateManager |
persist(java.lang.Object pc,
java.lang.Object id,
boolean explicit,
OpCallbacks call)
Assigns slice identifier to the resultant StateManager as initialized by
the super class implementation.
|
void |
unlock()
Releases the internal lock.
|
finalizeaddLifecycleListener, addTransactionListener, afterCompletion, assertActiveTransaction, assertNontransactionalRead, assertOpen, assertPersistenceCapable, assertWriteOperation, assignObjectId, attach, attachAll, beforeCompletion, begin, beginOperation, cancelAll, checkForDuplicateId, clone, close, commit, commitAndResume, delete, deleteAll, detach, detachAll, detachAll, detachAll, dirtyType, embed, endTransaction, evict, evictAll, evictAll, evictAll, extentIterator, find, find, find, findAll, findAll, findAll, findCached, flush, flush, free, getAutoClear, getAutoDetach, getBroker, getBrokerFactory, getCacheFinderQuery, getCachePreparedQuery, getClassLoader, getConnection, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionPassword, getConnectionRetainMode, getConnectionUserName, getDeletedTypes, getDetachState, getDirtyObjects, getDirtyStates, getEvictFromDataCache, getFetchConfiguration, getIdentitySequence, getIgnoreChanges, getInverseManager, getLifecycleEventManager, getLifecycleListenerCallbackMode, getLockLevel, getLockManager, getManagedObjects, getManagedRuntime, getManagedStates, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getObjectId, getObjectIdType, getOperatingSet, getOptimistic, getOrderDirtyObjects, getPendingTransactionalObjects, getPendingTransactionalStates, getPersistedTypes, getPopulateDataCache, getProperties, getRestoreState, getRetainState, getRollbackCause, getRollbackOnly, getStateManager, getStateManagerImpl, getStateManagerImplById, getStoreManager, getSupportedProperties, getSuppressBatchOLELogging, getSynchronization, getSyncWithManagedTransactions, getTransactionalObjects, getTransactionalStates, getTransactionListenerCallbackMode, getTransactionListeners, getUpdatedTypes, getUserObject, getValueSequence, getVersion, hasConnection, initialize, initialize, initialize, isActive, isCached, isClosed, isCloseInvoked, isDeleted, isDetached, isDetachedNew, isDirty, isFromWriteBehindCallback, isManaged, isNew, isPersistent, isStoreActive, isTrackChangesByType, isTransactional, lock, lock, lockAll, lockAll, newExtent, newInstance, newManagedObjectCache, newObjectId, newQuery, newQuery, newStateManagerImpl, nontransactional, nontransactionalAll, persist, persist, persist, persistAll, persistAll, popFetchConfiguration, preFlush, processArgument, processReturn, pushFetchConfiguration, putUserObject, refresh, refreshAll, refreshInternal, refreshInternal, release, releaseAll, releaseSavepoint, releaseSavepoint, removeLifecycleListener, removeTransactionListener, retrieve, retrieveAll, rollback, rollbackAndResume, rollbackToSavepoint, rollbackToSavepoint, setAuthentication, setAutoClear, setAutoDetach, setAutoDetach, setCacheFinderQuery, setCachePreparedQuery, setConnectionFactory2Name, setConnectionFactoryName, setDetachedNew, setDetachState, setEvictFromDataCache, setIgnoreChanges, setImplicitBehavior, setLifecycleListenerCallbackMode, setMultithreaded, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setOrderDirtyObjects, setPopulateDataCache, setRestoreState, setRetainState, setRollbackOnly, setRollbackOnly, setSavepoint, setSuppressBatchOLELogging, setSynchronization, setSyncWithManagedTransactions, setTrackChangesByType, setTransactionListenerCallbackMode, syncWithManagedTransaction, transactional, transactionalAll, validateChangesequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, addTransactionListener, assertActiveTransaction, assertNontransactionalRead, assertOpen, assertWriteOperation, attach, attachAll, begin, beginOperation, cancelAll, close, commit, commitAndResume, delete, deleteAll, detach, detachAll, detachAll, detachAll, dirtyType, evict, evictAll, evictAll, evictAll, flush, getAutoClear, getAutoDetach, getBrokerFactory, getCachePreparedQuery, getConnectionRetainMode, getEvictFromDataCache, getIdentitySequence, getIgnoreChanges, getInverseManager, getLifecycleEventManager, getLifecycleListenerCallbackMode, getManagedRuntime, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getProperties, getRestoreState, getRetainState, getRollbackCause, getRollbackOnly, getSupportedProperties, getSyncWithManagedTransactions, getTransactionListenerCallbackMode, getTransactionListeners, getUserObject, getValueSequence, isClosed, isCloseInvoked, isDetached, isDetachedNew, lock, lock, lockAll, lockAll, newExtent, newInstance, newQuery, newQuery, persist, persist, persistAll, preFlush, putUserObject, refresh, refreshAll, release, releaseAll, releaseSavepoint, releaseSavepoint, removeLifecycleListener, removeTransactionListener, rollback, rollbackAndResume, rollbackToSavepoint, rollbackToSavepoint, setAutoClear, setAutoDetach, setAutoDetach, setCachePreparedQuery, setDetachedNew, setEvictFromDataCache, setIgnoreChanges, setImplicitBehavior, setLifecycleListenerCallbackMode, setMultithreaded, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setRestoreState, setRetainState, setRollbackOnly, setRollbackOnly, setSavepoint, setSyncWithManagedTransactions, setTransactionListenerCallbackMode, syncWithManagedTransaction, validateChangesafterCompletion, beforeCompletionembed, extentIterator, find, find, findAll, findAll, findCached, getBroker, getClassLoader, getConnection, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionPassword, getConnectionUserName, getDeletedTypes, getDetachState, getDirtyObjects, getFetchConfiguration, getLockLevel, getLockManager, getManagedObjects, getObjectId, getObjectIdType, getOrderDirtyObjects, getPendingTransactionalObjects, getPersistedTypes, getPopulateDataCache, getStateManager, getStoreManager, getTransactionalObjects, getUpdatedTypes, getVersion, hasConnection, isActive, isCached, isDeleted, isDirty, isManaged, isNew, isPersistent, isStoreActive, isTrackChangesByType, isTransactional, newObjectId, nontransactional, nontransactionalAll, popFetchConfiguration, pushFetchConfiguration, retrieve, retrieveAll, setConnectionFactory2Name, setConnectionFactoryName, setDetachState, setOrderDirtyObjects, setPopulateDataCache, setTrackChangesByType, transactional, transactionalAllpublic DistributedConfiguration getConfiguration()
StoreContextgetConfiguration in interface StoreContextgetConfiguration in class BrokerImplpublic DistributedStoreManager getDistributedStoreManager()
public Slice addSlice(java.lang.String name, java.util.Map properties)
DistributedBrokeraddSlice in interface DistributedBrokername - logical name of the to be added slice. Must be different from
any currently available slices.properties - key-value pair of configuration for the slice to be
added. The keys must have openjpa.slice.<name>.* as prefix.DistributedConfiguration.getAvailableSliceNames(),
DistributedConfiguration.addSlice(String, Map)public OpenJPAStateManager persist(java.lang.Object pc, java.lang.Object id, boolean explicit, OpCallbacks call)
DistributionPolicy for given pc if it is a root
instance i.e. the argument of the user application's persist() call. The
cascaded instances are detected by non-empty status of the current
operating set. The slice is assigned only if a StateManager has never
been assigned before.persist in class BrokerImplpublic boolean endOperation()
BrokerImplendOperation in interface BrokerendOperation in class BrokerImplprotected QueryImpl newQueryImpl(java.lang.String lang, StoreQuery sq)
newQueryImpl in class BrokerImplpublic void lock()
lock in interface StoreContextlock in class BrokerImplpublic void unlock()
StoreContextunlock in interface StoreContextunlock in class BrokerImplpublic void beginStore()
beginStore in interface StoreContextbeginStore in class BrokerImpl