Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa » slice » [javadoc | source]
org.apache.openjpa.slice
public class: DistributedBrokerImpl [javadoc | source]
java.lang.Object
   org.apache.openjpa.kernel.BrokerImpl
      org.apache.openjpa.kernel.FinalizingBrokerImpl
         org.apache.openjpa.slice.DistributedBrokerImpl

All Implemented Interfaces:
    Cloneable, Broker, Serializable, FindCallbacks

A specialized Broker to associate slice identifiers with the StateManagers as they are persisted in a cascade. This intervention helps the user to define distribution policy only for root instances i.e. the instances that are explicit argument to persist() call. The cascaded instances are assigned the same slice to honor collocation constraint.
Fields inherited from org.apache.openjpa.kernel.BrokerImpl:
FLUSH_INC,  FLUSH_COMMIT,  FLUSH_ROLLBACK,  FLUSH_LOGICAL,  STATUS_INIT,  STATUS_TRANSIENT,  STATUS_OID_ASSIGN,  STATUS_COMMIT_NEW
Method from org.apache.openjpa.slice.DistributedBrokerImpl Summary:
endOperation,   getSlice,   persist
Methods from org.apache.openjpa.kernel.FinalizingBrokerImpl:
finalize
Methods from org.apache.openjpa.kernel.BrokerImpl:
addDereferencedDependent,   addLifecycleListener,   addToPendingTransaction,   addToTransaction,   addTransactionListener,   afterCompletion,   assertActiveTransaction,   assertNontransactionalRead,   assertOpen,   assertPersistenceCapable,   assertWriteOperation,   assignObjectId,   attach,   attachAll,   beforeCompletion,   begin,   beginOperation,   beginStore,   cancelAll,   checkForDuplicateId,   clone,   close,   commit,   commitAndResume,   copy,   delete,   delete,   deleteAll,   detach,   detachAll,   detachAll,   detachAll,   dirtyType,   embed,   endOperation,   endTransaction,   evict,   evictAll,   evictAll,   evictAll,   extentIterator,   find,   find,   find,   findAll,   findAll,   findAll,   findCached,   fireLifecycleEvent,   flush,   flush,   free,   gatherCascadeRefresh,   getAutoClear,   getAutoDetach,   getBroker,   getBrokerFactory,   getClassLoader,   getConfiguration,   getConnection,   getConnectionPassword,   getConnectionRetainMode,   getConnectionUserName,   getDeletedTypes,   getDetachState,   getDirtyObjects,   getDirtyStates,   getEvictFromDataCache,   getFetchConfiguration,   getIdentitySequence,   getIgnoreChanges,   getInstanceExceptionTranslator,   getInverseManager,   getLifecycleEventManager,   getLifecycleListenerCallbackMode,   getLockLevel,   getLockManager,   getManagedObjects,   getManagedRuntime,   getManagedStates,   getMultithreaded,   getNontransactionalRead,   getNontransactionalWrite,   getObjectId,   getObjectIdType,   getOperatingSet,   getOptimistic,   getOrderDirtyObjects,   getPendingTransactionalObjects,   getPendingTransactionalStates,   getPersistedTypes,   getPopulateDataCache,   getRestoreState,   getRetainState,   getRollbackCause,   getRollbackOnly,   getStateManager,   getStateManagerImpl,   getStateManagerImplById,   getStoreManager,   getSyncWithManagedTransactions,   getSynchronization,   getTransactionListenerCallbackMode,   getTransactionalObjects,   getTransactionalStates,   getUpdatedTypes,   getUserObject,   getValueSequence,   getVersion,   hasConnection,   initialize,   initialize,   isActive,   isCloseInvoked,   isClosed,   isDeleted,   isDetached,   isDetachedNew,   isDirty,   isManaged,   isNew,   isPersistent,   isSerializing,   isStoreActive,   isTrackChangesByType,   isTransactionEnding,   isTransactional,   lock,   lock,   lock,   lockAll,   lockAll,   newExtent,   newInstance,   newManagedObjectCache,   newObjectId,   newQuery,   newQuery,   newQueryImpl,   newStateManagerImpl,   nontransactional,   nontransactionalAll,   persist,   persist,   persist,   persist,   persistAll,   persistAll,   popFetchConfiguration,   preFlush,   processArgument,   processReturn,   pushFetchConfiguration,   putUserObject,   refresh,   refreshAll,   refreshInternal,   refreshInternal,   release,   releaseAll,   releaseSavepoint,   releaseSavepoint,   removeDereferencedDependent,   removeFromPendingTransaction,   removeFromTransaction,   removeLifecycleListener,   removeTransactionListener,   retrieve,   retrieveAll,   rollback,   rollbackAndResume,   rollbackToSavepoint,   rollbackToSavepoint,   setAuthentication,   setAutoClear,   setAutoDetach,   setAutoDetach,   setDetachState,   setDetachedNew,   setDirty,   setEvictFromDataCache,   setIgnoreChanges,   setImplicitBehavior,   setLifecycleListenerCallbackMode,   setMultithreaded,   setNontransactionalRead,   setNontransactionalWrite,   setOptimistic,   setOrderDirtyObjects,   setPopulateDataCache,   setRestoreState,   setRetainState,   setRollbackOnly,   setRollbackOnly,   setSavepoint,   setStateManager,   setSyncWithManagedTransactions,   setSynchronization,   setTrackChangesByType,   setTransactionListenerCallbackMode,   syncWithManagedTransaction,   transactional,   transactionalAll,   unlock,   validateChanges
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.slice.DistributedBrokerImpl Detail:
 public boolean endOperation() 
 String getSlice(Object pc) 
    Gets the slice by the user-defined distribution policy.
 public OpenJPAStateManager persist(Object pc,
    Object id,
    boolean explicit,
    OpCallbacks call) 
    Assigns slice identifier to the resultant StateManager as initialized by the super class implementation. The slice identifier is decided by 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.