ilog.mt
Class IlSynchronizeOnLockStrategy

java.lang.Object
  extended by ilog.mt.IlSynchronizationStrategy
      extended by ilog.mt.IlSynchronizeOnLockStrategy

public class IlSynchronizeOnLockStrategy
extends IlSynchronizationStrategy

This class provides an implementation of the IlSynchronizationStrategy abstract class. It uses synchronization on an object. This class can be used in a servlet environment.

Since:
JTGO 3.0

Field Summary
 
Fields inherited from class ilog.mt.IlSynchronizationStrategy
DEFAULT_PROPERTY
 
Constructor Summary
IlSynchronizeOnLockStrategy()
           
 
Method Summary
 boolean synchronizeRun(Runnable runnable, Object lock)
          The runnable parameter is run in a block synchronizing on the lock parameter.
 
Methods inherited from class ilog.mt.IlSynchronizationStrategy
GetDefault, isInTargetThread, readLock, SetDefault, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlSynchronizeOnLockStrategy

public IlSynchronizeOnLockStrategy()
Method Detail

synchronizeRun

public boolean synchronizeRun(Runnable runnable,
                              Object lock)
The runnable parameter is run in a block synchronizing on the lock parameter. If the lock parameter implements the IlLockProxy interface, the object returned by the IlLockProxy.getLock() method is used to synchronize.

Specified by:
synchronizeRun in class IlSynchronizationStrategy
Parameters:
runnable - The Runnable object on which the run method will be called
lock - This object may be used as the object to synchronize on
Returns:
false if the operation fails for any reason.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.