|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.perseus.concurrency.optimistic.OptimisticConcurrencyManager
Field Summary | |
---|---|
static java.lang.String |
DEPENDENCY_GRAPH_BINDING
|
protected Logger |
logger
|
protected java.util.Map |
timeStamps
A map associating time stamps to all oids in all active contexts. |
Constructor Summary | |
---|---|
OptimisticConcurrencyManager()
|
Method Summary | |
---|---|
void |
abort(java.lang.Object ctx)
This method allows to release the resources allocated in a given context. |
void |
begin(java.lang.Object ctx)
This method records the start of an execution context. |
void |
bindFc(java.lang.String s,
java.lang.Object o)
|
void |
closeTimeStamp(TimeStamp timeStamp,
java.lang.Object ctx)
|
void |
finalize(java.lang.Object ctx)
This method marks the end of accesses made by the execution context. |
protected java.lang.Object |
getResourceId(java.lang.Object object)
|
protected abstract java.lang.Object |
getState(java.lang.Object ctx,
java.lang.Object resourceId,
TimeStamp timeStamp,
boolean isDirtyBefore,
boolean isWrite)
|
java.lang.String[] |
listFc()
|
java.lang.Object |
lookupFc(java.lang.String s)
|
java.lang.Object |
readIntention(java.lang.Object ctx,
java.lang.Object resource,
java.lang.Object thinLock)
This method records an access intention to a data object in read mode. |
void |
unbindFc(java.lang.String s)
|
boolean |
validate(java.lang.Object ctx)
This method requests the validation os accesses made by the context. |
java.lang.Object |
writeIntention(java.lang.Object ctx,
java.lang.Object resource,
java.lang.Object thinLock)
This method records an access intention to a data object in write mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEPENDENCY_GRAPH_BINDING
protected Logger logger
protected java.util.Map timeStamps
Constructor Detail |
public OptimisticConcurrencyManager()
Method Detail |
protected abstract java.lang.Object getState(java.lang.Object ctx, java.lang.Object resourceId, TimeStamp timeStamp, boolean isDirtyBefore, boolean isWrite) throws ConcurrencyException
ctx
- is the context using the resourceresourceId
- is the resource identifiertimeStamp
- is the TimeStamp instance matching the resourceisDirtyBefore
- indicates if the object was already dirty before
the access.isWrite
- indicates if the access is a write access
ConcurrencyException
- it is not possible to create a State for
this resource identifier. One reason can the unavailibity of the
resource.public java.lang.String[] listFc()
public java.lang.Object lookupFc(java.lang.String s)
public void bindFc(java.lang.String s, java.lang.Object o)
public void unbindFc(java.lang.String s)
public void begin(java.lang.Object ctx)
ConcurrencyManager
begin
in interface ConcurrencyManager
ctx
- is the contextpublic boolean validate(java.lang.Object ctx)
ConcurrencyManager
validate
in interface ConcurrencyManager
public void finalize(java.lang.Object ctx)
ConcurrencyManager
finalize
in interface ConcurrencyManager
public void closeTimeStamp(TimeStamp timeStamp, java.lang.Object ctx)
public void abort(java.lang.Object ctx)
ConcurrencyManager
abort
in interface ConcurrencyManager
protected java.lang.Object getResourceId(java.lang.Object object)
public java.lang.Object readIntention(java.lang.Object ctx, java.lang.Object resource, java.lang.Object thinLock) throws ConcurrencyException
ConcurrencyManager
readIntention
in interface ConcurrencyManager
resource
- is the resource or it identifier (Object used for
synchronization)ctx
- is an identifier of the execution context. It can be a
transaction handle.thinLock
- permit to take smaller lock than on the resource globaly
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.public java.lang.Object writeIntention(java.lang.Object ctx, java.lang.Object resource, java.lang.Object thinLock) throws ConcurrencyException
ConcurrencyManager
writeIntention
in interface ConcurrencyManager
resource
- is the resource or its identifierctx
- is an identifier of the execution context. It can be a
transaction handle.thinLock
- permit to take smaller lock than on the resource globaly
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.
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |