run
on the specified
Runnable
object. Depending on the implementation of the strategy, the
synchronization may be global (such as in a Swing application),
or may use the object passed as the
lock
parameter to synchronize on.
run
on the specified
Runnable
object. Some implementations may not support read/write locks.
For this reason, the default implementation will call the
synchronizeRun
method.
run
on the specified
Runnable
object. Some implementations may not support read/write locks.
For this reason, the default implementation will call the
synchronizeRun
method.
IlpContext context = IltSystem.GetDefaultContext(); IlSynchronizationStrategy strategy = context.getSynchronizationStrategy(); Runnable task = new Runnable() { public void run() { ... } } IlpNetwork networkComponent = new IlpNetwork(context); strategy.writeLock(task, networkComponent.getModel());
<synchronizationStrategy>
.
[<synchronizationStrategy type="application"|"servlet"/>]
type
:
application
creates a synchronization strategy for Swing-based
applications using the IlSwingThreadSyncStrategy class.
servlet
creates a synchronization strategy for servlet applications
using the IlSynchronizeOnLockStrategy class.
IlpDefaultContext context = ... IlSynchronizationStrategy strategy = new IlSwingThreadSyncStrategy(); context.addService(IlSynchronizationStrategy.class, strategy);