|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ClusteringToolkit
| Method Summary | ||
|---|---|---|
ClusteredLock |
createLock(Object monitor,
LockType type)
Create a clustered lock around the supplied clustered monitor object. |
|
ClusteredAtomicLong |
getAtomicLong(String name)
Get or create a clustered atomic long value. |
|
Barrier |
getBarrier(String name,
int parties)
Get or create a clustered barrier identified by the given name. |
|
|
getBlockingQueue(String name)
Get or create a clustered blocking queue with no capacity limit |
|
|
getBlockingQueue(String name,
int capacity)
Get or create a clustered blocking queue with a capacity limit. |
|
ClusterInfo |
getClusterInfo()
Retrieve a ClusterInfo object for the cluster this toolkit instance is related to. |
|
|
getList(String name)
Get or create a clustered list. |
|
|
getMap(String name)
Get or create a clustered map. |
|
ReadWriteLock |
getReadWriteLock(String name)
Get or create a clustered read-write lock identified by the given name. |
|
ClusteredTextBucket |
getTextBucket(String name)
Get or create a clustered text bucket identified by the given name. |
|
| Method Detail |
|---|
Barrier getBarrier(String name,
int parties)
throws IllegalArgumentException
If the named barrier already exists with the same number of parties
then it is returned. If it doesn't exist it is created and registered.
If the named barrier already exists but has a different number of parties
then IllegalArgumentException is thrown.
name - identifier for the barrierparties - number of parties
IllegalArgumentException - if there is an existing barrier with a
different number of partiesReadWriteLock getReadWriteLock(String name)
If the named lock already exists then it is returned. If it doesn't exist it is created and registered.
name - identifier for the lock
ClusteredTextBucket getTextBucket(String name)
If the named bucket already exists then it is returned. If it doesn't exist it is created and registered.
name - identifier for the bucket
<E> BlockingQueue<E> getBlockingQueue(String name)
throws IllegalArgumentException
If the named queue already exists and has no capacity limit then it is
returned. If it doesn't exist then it is created and registered. If the
named queue already exists but has a capacity limit then
IllegalArgumentException is thrown.
name - identifier for the queue
IllegalArgumentException - if there is an existing queue with a
capacity limit
<E> BlockingQueue<E> getBlockingQueue(String name,
int capacity)
throws IllegalArgumentException
If the named queue already exists and it has the same capacity limit then
it is returned. If it doesn't exist then it is created and registered. If
the named queue already exists but has a different capacity limit then
IllegalArgumentException is thrown.
name - identifier for the queuecapacity - the capacity limit for the queue
IllegalArgumentException - if there is an existing queue with a
different capacity limitClusteredAtomicLong getAtomicLong(String name)
If the named atomic long already exists then it is returned. If not it is created and registered.
name - identifier for the atomic long
<K,V> ClusteredMap<K,V> getMap(String name)
If the named map already exists then it is returned. If not it is created and registered.
K - key typeV - value typename - identifier for the map
<E> List<E> getList(String name)
If the named list already exists then it is returned. If not it is created and registered.
E - element typename - identifier for the list
ClusteredLock createLock(Object monitor,
LockType type)
throws IllegalArgumentException,
NullPointerException
The supplied lock type controls the lock hold acquired by the default
Lock inherited methods.
If the supplied monitor object is null then NullPointerException is
thrown. If it is not clustered then IllegalArgumentException is
thrown.
monitor - clustered objecttype - default lock hold type
IllegalMonitorStateException - if monitor is not clustered
NullPointerException - if monitor is null
IllegalArgumentExceptionClusterInfo getClusterInfo()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||