Method Summary |
|
public void | addForDelete(OID oid, State state) Add the OID and State for deletion. |
public void | addLifecycleListener(LifecycleListener listener, Class[] classes) |
public void | addToCache(StatesReturned container) Add all the OIDs and States in the container to the cache. |
public void | addTxStateObject(PCStateMan stateObject) add an transactional instance to the list. |
public void | afterCompletion(int status) |
public void | beforeCompletion() |
public void | begin() |
public void | cancelQueryExecution() |
public void | checkModelConsistency() Check the consistency of all instances in the local cache. |
final public void | checkNonTxRead() |
final public void | checkNonTxWrite() |
public void | checkToPreFetch(Object[] oids, int stateFieldNo, int navClassIndex) <<<<<<< VersantPersistenceManagerImp.java
This util method is used by collection types to preload their pc
entries. |
public void | clearTxDirtyList() Clear the dirty list. |
public synchronized void | close() This is called by the user to close the pm. |
public void | commit() This calls commit on all the transactional objects. |
public void | commit(Xid xid, boolean onePhase) Commit the work done on this resource in the given transaction. |
public void | convertPcParamsToOID(Object[] params) Convert all PC, VersantOid and objectid-class params to OIDs. |
public StateManager | createStateManagerProxy(PCStateMan sm) Create a proxy for a PCStateMan or return it as is if no proxy is
needed. |
public Transaction | currentTransaction() |
public void | deletePersistent(Object pc) |
public void | deletePersistentAll(Object[] pcs) |
public void | deletePersistentAll(Collection pcs) |
public void | destroy() Destroy the PM. |
public boolean | doBeforeState(boolean isTransient, boolean isTransactional) |
public void | dump(OID oid) |
public void | end(Xid xid, int flags) Called to disassociate the resource from a transaction.
If the flags argument is
VersantPersistenceManagerImp.TMSUCCESS , the portion of work
was done sucessfully.
If the flags argument is
VersantPersistenceManagerImp.TMFAIL , the portion of work
failed. |
public void | evict(Object pc) |
public void | evictAll() |
public void | evictAll(Object[] pcs) |
public void | evictAll(Collection pcs) |
public void | evictAllFromL2CacheAfterCommit(Object[] data) |
public void | evictAllFromL2CacheAfterCommit(Collection data) |
public void | evictAllFromL2CacheAfterCommit(Class cls, boolean includeSubclasses) |
public void | evictAllFromL2CacheAfterCommit() |
public void | evictFromL2CacheAfterCommit(Object o) |
public void | evictFromL2CacheAfterCommitImp(Object o) Version of
VersantPersistenceManagerImp.evictFromL2CacheAfterCommit without the active tx
check for interna use. |
public OID | extractOID(Object oid) |
protected void | finalize() Reset the proxy so that if a client has a weak/soft ref to pm he will
get a closed exception. |
public void | fireDelete(ClassMetaData cmd, Object o) Fire a delete to all of the LifecycleListener's for o. |
public void | flush() This flushes everything to the store. |
public void | flush(boolean retainValues) |
public void | flushIfDepOn(int[] cmdBits) |
public void | flushRetainState() This is used to flush the current changes to the store. |
public void | forget(Xid xid) Tells the resource manager to forget about a heuristic decision. |
public Reference | getActiveReference() |
public LocalPMCache | getCache() |
public VersantSCOCollection | getCollectionField(PersistenceCapable pc, int fieldNo) Get a collection field from a pc. |
public String | getConnectionDriverName(String dataStore) |
public String | getConnectionURL(String dataStore) |
public int | getDatastoreTxLocking() Get the locking mode for datastore transactions. |
public Extent | getExtent(Class persistenceCapableClass, boolean subclasses) todo keep extent's around instead of creating a new one. |
public Object | getExternalOID(OID oid) |
public boolean | getIgnoreCache() |
public OID | getInternalOID(PersistenceCapable pc) Return the internal oid representation for this pc instance.
This oid is the actual oid and not a clone. |
public PCStateMan | getInternalSM(PersistenceCapable pc) This is used internally to obtain the PCStateObject for a PersistanceCapable
instance. |
public PCStateMan | getInternalSM(OID oid) This is used internally to obtain the PCStateObject for a PersistanceCapable
instance. |
public State | getInternaleState(PersistenceCapable pc) This is used for debug. |
public Connection | getJdbcConnection(String datastore) |
public MemQueryCompiler | getMemQueryCompiler() |
public boolean | getMultithreaded() |
public boolean | getNontransactionalRead() |
public boolean | getNontransactionalWrite() |
OID | getOID(VersantDetachable detachable) |
public Object | getObjectByIDString(String value, boolean toValidate) |
public Object | getObjectByIDString(String value, boolean toValidate, boolean resolved) |
public Object | getObjectById(Object oid, boolean validate) |
public Object | getObjectByIdForState(OID oid, int stateFieldNo, int navClassIndex, OID fromOID) This is use by State implementations when they need to retrieve an
instance. |
public Object | getObjectByIdFromCache(Object oid) Return the instance for oid if it is present in the local PM cache
otherwise return null. |
public Object | getObjectField(PersistenceCapable pc, int fieldNo) |
public Object | getObjectId(Object pc) |
public Class | getObjectIdClass(Class cls) |
public int | getObjectsById(Object[] oids, int length, Object[] data, int stateFieldNo, int classMetaDataIndex) This util method is used by collection types to preload their pc
entries. |
public boolean | getOptimistic() |
public Object | getOptimisticLockingValue(Object o) |
public PersistenceManager | getPersistenceManager() |
public PersistenceManager | getPersistenceManager(PersistenceCapable pc) |
public PersistenceManagerFactory | getPersistenceManagerFactory() |
public int | getPmCacheRefType() |
public PMProxy | getProxy() |
public boolean | getRestoreValues() |
public boolean | getRetainValues() |
public PCStateMan | getSMIfManaged(PersistenceCapable pc) |
public StatesReturned | getState(OID oid, State current, int fgi, int fieldNo, int navClassIndex, boolean ignoreLocalPmCache) This is called by sm's if they require a field. |
public StatesReturned | getStateForDetach(OID oid, int fgi) This is called by sm's if they require a field. |
public void | getStateForRefresh(OID oid, State current, int fgi) This is called by sm's when doing a refresh. |
public State | getStateFromLocalCacheById(Object oid) |
final PCStateMan | getStateManager(Object o) |
final PCStateMan | getStateManagerById(Object oid) |
public StorageManager | getStorageManager() Get our StorageManager. |
public Synchronization | getSynchronization() |
public int | getTransactionTimeout() Get the current transaction timeout value for this resource. |
public Object | getTransactionalObjectId(Object pc) |
public Object | getUserObject() |
public boolean | hasIdentity(Object pc) Does the instance have an identity? New instances are only assigned
an identity on commit or flush or when the application executes an
operation that requires the identity. |
public boolean | isActive() |
final public boolean | isActiveDS() |
public boolean | isActualClosed() |
public boolean | isCheckModelConsistencyOnCommit() |
public boolean | isClosed() |
public boolean | isDirty() |
public boolean | isHollow(Object pc) Is the instance hollow? Hollow instances are managed but their fields
have not been loaded from the level 2 cache or database. |
public boolean | isIgnoreCache() |
public boolean | isInPool() |
public boolean | isInTx() |
public boolean | isInterceptDfgFieldAccess() |
public boolean | isManaged() Is this pm managed by a container. |
public boolean | isMustNotPool() |
public boolean | isNontransactionalRead() |
public boolean | isNontransactionalWrite() |
public boolean | isOptimistic() |
public boolean | isPClean(Object pc) |
public boolean | isPDeleted(Object pc) |
public boolean | isPDirty(Object pc) |
public boolean | isPNew(Object pc) |
public boolean | isPNewDeleted(Object pc) |
public boolean | isPNonTx(Object pc) |
public boolean | isRestoreValues() |
public boolean | isRetainValues() |
public boolean | isSameRM(XAResource xaResource) This method does not check for inPool because Weblogic seems to keep
a ref around of used ones to try and re-use it. |
public boolean | isStateRequired(OID oid, FetchGroup fetchGroup) The StorageManager calls this method to check if we need prefetched
data or not. |
public boolean | isStrict() |
public boolean | isTClean(Object pc) |
public boolean | isTDirty(Object pc) |
public void | loadFetchGroup(Object pc, String name) |
public void | logEvent(int level, String description, int ms) |
public void | makeNontransactional(Object pc) |
public void | makeNontransactionalAll(Object[] pcs) |
public void | makeNontransactionalAll(Collection pcs) |
public void | makePersistent(Object o) |
public void | makePersistentAll(Object[] pcs) |
public void | makePersistentAll(Collection pcs) |
public void | makeReachablePersistent(Object o) Make an instance found in a reachability search persistent. |
public void | makeTransactional(Object pc) |
public void | makeTransactionalAll(Object[] pcs) |
public void | makeTransactionalAll(Collection pcs) |
public void | makeTransient(Object pc) TODO: Remove the instance from the weak caches. |
public void | makeTransientAll(Object[] pcs) TODO: Remove the instance from the weak caches. |
public void | makeTransientAll(Collection pcs) TODO: Remove the instance from the weak caches. |
public void | makeTransientRecursive(Object pc) |
public Object | newObjectIdInstance(Class cls, String s) |
public Object | newObjectIdInstance(Class cls, String s, boolean resolved) |
public Query | newQuery() |
public Query | newQuery(Object compiled) |
public Query | newQuery(String language, Object query) |
public Query | newQuery(Class cls) |
public Query | newQuery(Extent extent) |
public Query | newQuery(Extent extent, String filter) |
public Query | newQuery(Class cls, Collection cln) |
public Query | newQuery(Class cls, String filter) |
public Query | newQuery(Class cls, Collection cln, String filter) |
public void | phaseCommit1() This will do everything except actually commit to the store. |
public void | phaseCommit2() Do the actual commit on the store. |
public int | prepare(Xid xid) Prepare to commit the work done on this resource in the given
transaction.
This method cannot return a status indicating that the transaction
should be rolled back. |
public void | processLocalCacheReferenceQueue() Process the ReferenceQueue for the local cache. |
public PCStateMan | reManage(OID oid, State state) This is called by the JDOManagedCache when an instance is added
but it is not already managed. |
public Xid[] | recover(int flag) Return a list of transactions that are in a prepared or heuristically
state.
This method looks not only at the resource it is invoked on, but
also on all other resources managed by the same resource manager.
It is intended to be used by the application server when recovering
after a server crash.
A recovery scan is done with one or more calls to this method.
At the first call,
VersantPersistenceManagerImp.TMSTARTRSCAN must be in the
state argument to indicate that the scan should be started.
During the recovery scan, the resource manager maintains an internal
cursor that keeps track of the progress of the recovery scan.
To end the recovery scan, the
VersantPersistenceManagerImp.TMENDRSCAN must be passed
in the state argument.
Parameters: flag - Must be either VersantPersistenceManagerImp.TMNOFLAGS, VersantPersistenceManagerImp.TMSTARTRSCAN,VersantPersistenceManagerImp.TMENDRSCAN or TMSTARTRSCAN|TMENDRSCAN . |
public void | refresh(Object pc) |
public void | refreshAll(Object[] pcs) |
public void | refreshAll(Collection pcs) |
public void | refreshAll() |
public void | removeLifecycleListener(LifecycleListener listener) |
public void | removeTxStateObject(PCStateMan stateObject) |
public void | resetForPooling() This will reset the pm to be returned to the pool. |
public void | retrieve(Object o) |
public void | retrieveAll(Collection collection) |
public void | retrieveAll(Collection collection, boolean b) |
public void | retrieveAll(Object[] objects, boolean b) |
public void | retrieveAll(Object[] objects) |
public void | retrieveAllImp(Object[] toRetrieve) |
public void | retrieveAllImp(Collection toRetrieve) |
public void | retrieveImp(Object o) |
public void | rollback() This is for client to rollback the connection. |
public void | rollback(Xid xid) Roll back the work done on this resource in the given transaction. |
public void | rollbackForFatalExceptionInJDOConnectionProxy() This is called by JDOConnectionImpProxy when it handles a
JDOFatalException from a call to the JDOConnection. |
public void | setActiveReference(Reference activeReference) |
public void | setCache(LocalPMCache cache) |
public void | setCheckModelConsistencyOnCommit(boolean on) |
public void | setDatastoreTxLocking(int mode) Set the locking mode for datastore transactions. |
public void | setIgnoreCache(boolean flag) |
public void | setInPool(boolean inPool) This is called by the pool instance the moment comes in or out of the
pool. |
public void | setInterceptDfgFieldAccess(boolean on) |
public void | setListeners(LifecycleListenerManager listeners) |
public void | setManaged(boolean managed) set the state of the pm to be in a container. |
public void | setMasterOnDetail(PersistenceCapable detail, int managedFieldNo, PersistenceCapable master, boolean removeFromCurrentMaster) Sets the master on the detail in a Master/Detail relationship. |
public void | setMultithreaded(boolean flag) |
public void | setMultithreadedImp(boolean flag) |
public void | setMustNotPool(boolean mustNotPool) |
public void | setNontransactionalRead(boolean nontransactionalRead) |
public void | setNontransactionalWrite(boolean nontransactionalWrite) |
public void | setOptimistic(boolean optimistic) |
public void | setPmCacheRefType(Object pc, int type) |
public void | setPmCacheRefType(Object[] pcs, int type) |
public void | setPmCacheRefType(Collection col, int type) |
public void | setPmCacheRefType(int type) |
public void | setRestoreValues(boolean b) |
public void | setRetainConnectionInOptTx(boolean on) |
public void | setRetainValues(boolean retainValues) |
public void | setStrict(boolean strict) |
public void | setSynchronization(Synchronization sync) |
public boolean | setTransactionTimeout(int seconds) Set the transaction timeout value for this resource.
If the seconds argument is 0 , the
timeout value is set to the default timeout value of the resource
manager.
Not all resource managers support setting the timeout value.
If the resource manager does not support setting the timeout
value, it should return false.
Parameters: seconds - The timeout value, in seconds. |
public void | setUserObject(Object o) |
public void | start(Xid xid, int flags) Called to associate the resource with a transaction. |
public List | versantAllDirtyInstances() |
public Collection | versantAttachCopy(Collection detached, boolean makeTransactional) This method applies the changes contained in the collection of detached
instances to the corresponding persistent instances in the cache and
returns a collection of persistent instances that exactly corresponds to
the parameter instances. |
public Collection | versantAttachCopy(Collection detached, boolean makeTransactional, boolean shallow) This method applies the changes contained in the collection of detached
instances to the corresponding persistent instances in the cache and
returns a collection of persistent instances that exactly corresponds to
the parameter instances. |
public List | versantCollectReachable(Collection roots, String fetchGroup) |
public Collection | versantDetachCopy(Collection pcs, String fetchGroup) This method makes detached copies of the parameter instances and returns
the copies as the result of the method. |
public Query | versantNewNamedQuery(Class cls, String queryName) Construct a new query instance with the given candidate class from a
named query. |