public interface Synchronizer
An interface intended to be implemented as a singleton. It allows to get a unique synchronization object keyed by a string Id.
Modifier and Type | Method and Description |
---|---|
Object |
getSynchObject(String id)
Get the synch object associated with the passed id.
|
boolean |
releaseSynchObject(String id)
Release the synch object associated with the passed id.
|
Object getSynchObject(String id)
Get the synch object associated with the passed id. Once this method returns, we are save to assume that we have exclusive access to the resource represented by id.
boolean releaseSynchObject(String id)
Release the synch object associated with the passed id.
true
if the resource associated with the passed id has been released. false
if
the current thread is still holding the resource due to a recursive invocation of
getSynchObject(String)
.Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.