org.objectweb.perseus.persistence.api
Interface WorkingSet
- TransactionalWorkingSet
- BasicWorkingSet
public interface WorkingSet
It defines a context used in by the PersistenceManager. A context contains
a collection of CacheEntry instances and has a status.
- S.Chassande-Barrioz, Y.Bersihand
CTX_ACTIVE
public static final byte CTX_ACTIVE
The status of a non transactional context which is not already
closed.
- 1
CTX_CLOSED
public static final byte CTX_CLOSED
The status of a cloased context (transactional or not)
- 32
READ_INTENTION
public static final byte READ_INTENTION
The origin of the binding action.
- 1
UNKNOWN_INTENTION
public static final byte UNKNOWN_INTENTION
- 3
WRITE_INTENTION
public static final byte WRITE_INTENTION
- 2
bind
public State bind(State state,
Object oid,
byte mode)
Attaches an entry to the working set.
state
- is the state which must be attached to the working setoid
- is the id of the corresponding objectmode
- is the origin of the binding action: read/write intention
- the value of the old state in the cache, can be null if the state was not already in the cache
READ_INTENTION.WRITE_INTENTION.UNKNOWN_INTENTION
clear
public void clear()
Removes all entries of the working set.
entries
public Set entries()
- the list of entries attached to the working set.
getConnectionHolder
public ConnectionHolder getConnectionHolder()
- a ConnectionHolder instance permiting to acces the data support
getUserObject
public Object getUserObject()
- the user object linked to the working set
getWSRestoreValues
public boolean getWSRestoreValues()
getWSRetainValues
public boolean getWSRetainValues()
lookup
public State lookup(Object oid)
- the entry attached to the working set weither its identifier
oids
public Set oids()
- the list of entries attached to the working set
setWSRestoreValues
public void setWSRestoreValues(boolean val)
setWSRetainValues
public void setWSRetainValues(boolean val)
unbind
public boolean unbind(Object oid)
Dettaches an entry from the working set.
oid
- is the identifier of entry which must be detattached from
the working set
- true if the entry was present in the working set
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.