org.olat.commons.coordinate.singlevm
Class SingleVMSyncer

java.lang.Object
  extended by org.olat.commons.coordinate.singlevm.SingleVMSyncer
All Implemented Interfaces:
Syncer

Deprecated. USE ONLY ClusterSyncer because SingleVMSyncer synchronized only the execute block, ClusterSyncer synchronized until commit

public class SingleVMSyncer
extends java.lang.Object
implements Syncer

Description:
implementation of the Syncer for the singleVM mode.

Initial Date: 17.09.2007

Author:
felix

Method Summary
 void assertAlreadyDoInSyncFor(OLATResourceable ores)
          Deprecated. Check if already in synchronized block for certain olat-resource
<T> T
doInSync(OLATResourceable ores, SyncerCallback<T> callback)
          Deprecated. guarantees that the code r is running serialized in regard to other code with the same resourceable
 void doInSync(OLATResourceable ores, SyncerExecutor executor)
          Deprecated. same as doInSync(OLATResourceable ores, SyncerCallback action), but without return object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doInSync

public <T> T doInSync(OLATResourceable ores,
                      SyncerCallback<T> callback)
Deprecated. 
Description copied from interface: Syncer
guarantees that the code r is running serialized in regard to other code with the same resourceable

Specified by:
doInSync in interface Syncer
Parameters:
ores - the resourceable to sync upon
callback - the code to be executed in the protected region (it is executed synchronously, that is, within the same thread as the caller of this method)
Returns:
the Object that the SynceCallback returns (may be null). This can used to transfer results back to the caller.
See Also:
org.olat.core.util.coordinate.Syncer#doInSync(org.olat.core.id.OLATResourceable, java.lang.Runnable)

doInSync

public void doInSync(OLATResourceable ores,
                     SyncerExecutor executor)
Deprecated. 
Description copied from interface: Syncer
same as doInSync(OLATResourceable ores, SyncerCallback action), but without return object.

Specified by:
doInSync in interface Syncer

assertAlreadyDoInSyncFor

public void assertAlreadyDoInSyncFor(OLATResourceable ores)
Deprecated. 
Description copied from interface: Syncer
Check if already in synchronized block for certain olat-resource

Specified by:
assertAlreadyDoInSyncFor in interface Syncer