public class SyncTokenManager<T>
extends java.lang.Object
Constructor and Description |
---|
SyncTokenManager() |
Modifier and Type | Method and Description |
---|---|
SyncToken<T> |
getSyncToken(T key)
Returns a synchronization token associated with the given value.
|
void |
releaseSyncToken(SyncToken<T> token)
Decrements a reference count of the given token.
|
public SyncToken<T> getSyncToken(T key)
Object.equals(Object)
equals()} method) will
return the same token.key
- the value for which a token should be returnedpublic void releaseSyncToken(SyncToken<T> token)
SyncToken.close()
does the same thing.
One or the other should be called after every getSyncToken call, but never both.token
- the token to be released