org.terracotta.toolkit.object
Interface ToolkitLockedObject
- All Superinterfaces:
- ToolkitObject
- All Known Subinterfaces:
- ToolkitBlockingQueue<E>, ToolkitList<E>, ToolkitMap<K,V>, ToolkitSet<E>, ToolkitSortedMap<K,V>, ToolkitSortedSet<E>
public interface ToolkitLockedObject
- extends ToolkitObject
A ToolkitObject
which exposes a ToolkitReadWriteLock
. Mutative operations are performed under the
write-lock and reads are performed under the read-lock of the ToolkitReadWriteLock
getReadWriteLock
ToolkitReadWriteLock getReadWriteLock()
- Returns the lock under which mutations are done - can be used to lock externally to execute compound operations.
NOTE: Calling ToolkitObject.getName()
on the returned instance will return null. Same for the
ToolkitObject.getName()
on the read and write locks from the returned ToolkitReadWriteLock
Copyright © 2014 Terracotta, Inc.. All Rights Reserved.