DEPENDENCY_GRAPH_BINDING
public static final String DEPENDENCY_GRAPH_BINDING
POLICY_MUTEX
public static final short POLICY_MUTEX
- 1
POLICY_RW_FIFO
public static final short POLICY_RW_FIFO
- 3
POLICY_RW_PRIORITY2READERS
public static final short POLICY_RW_PRIORITY2READERS
- 2
POLICY_UNDEFINED
public static final short POLICY_UNDEFINED
- 0
contextInfos
protected Map contextInfos
A map associating a ContextInfo to each context.
dg
protected DependencyGraph dg
locks
protected Map locks
A map associating locks to all oids in all active contexts.
logger
protected Logger logger
policyStringVal
public static final String[] policyStringVal
abort
public void abort(Object ctx)
This method allows to release the resources allocated in a given context.
This method should be called when the validate method has returned false.
- abort in interface ConcurrencyManager
begin
public void begin(Object ctx)
This method records the start of an execution context. It can be a
transaction starting.
- begin in interface ConcurrencyManager
ctx
- is the context
bindFc
public void bindFc(String s,
Object o)
throws IllegalBindingException,
NoSuchInterfaceException
finalize
public void finalize(Object ctx)
This method marks the end of accesses made by the execution context. This
method should be called when the validate method has returned true.
- finalize in interface ConcurrencyManager
getFcState
public String getFcState()
getLock
protected Lock getLock(Object oid,
Object hints)
Returns the lock associated to the given oid.
oid
- an object identifier.
- the lock associated to the given oid.
getState
protected Object getState(Object ctx,
Object resourceId,
Lock lock,
Object hints)
throws ConcurrencyException
ctx
- is the context using the resourceresourceId
- is the resource identifierlock
- is the lock instance matching the resourcehints
- uses to give information on access
- the resource state to use
listFc
public String[] listFc()
lookupFc
public Object lookupFc(String s)
throws NoSuchInterfaceException
readIntention
public Object readIntention(Object ctx,
Object resourceId,
Object hints)
throws ConcurrencyException
This method records an access intention to a data object in read mode.
- readIntention in interface ConcurrencyManager
ctx
- is an identifier of the execution context. It can be a
transaction handle.resourceId
- is the resource identifierhints
- is an object parameter permiting to some implementation to
do some action at "readIntention time".
- null or an object depending on the ConcurrencyManager type
ConcurrencyException
- if the no resource are available for
this resource identifer or if there is a concurrency problem. In this
last case that means the context should be cancelled.
startFc
public void startFc()
throws IllegalLifeCycleException
stopFc
public void stopFc()
throws IllegalLifeCycleException
unbindFc
public void unbindFc(String s)
throws NoSuchInterfaceException
validate
public boolean validate(Object ctx)
This method requests the validation os accesses made by the context. It
retrieves a boolean value to indicate if the accesses are validate or
not.
- validate in interface ConcurrencyManager
writeIntention
public Object writeIntention(Object ctx,
Object resourceId,
Object hints)
throws ConcurrencyException
This method records an access intention to a data object in write mode.
A call to the readIntention is necessary before a call to this method.
- writeIntention in interface ConcurrencyManager
ctx
- is an identifier of the execution context. It can be a
transaction handle.resourceId
- is the resource identifierhints
- is an object parameter permiting to some implementation to
do some action at "readIntention time".
- null or an object depending on the ConcurrencyManager type
ConcurrencyException
- if the no resource are available for
this resource identifer or if there is a concurrency problem. In this
last case that means the context should be cancelled.