|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.concurrent.ConcurrencyUtil
public final class ConcurrencyUtil
Various bits of black magic garnered from experts on the concurrency-interest@cs.oswego.edu mailing list.
Method Summary | |
---|---|
static int |
hash(Object object)
Returns a hash code for non-null Object x. |
static int |
selectLock(Object key,
int numberOfLocks)
Selects a lock for a key. |
static void |
shutdownAndWaitForTermination(ExecutorService pool,
int waitSeconds)
Properly shutdown and await pool termination for an arbitrary amount of time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int hash(Object object)
object
- the object serving as a key
public static int selectLock(Object key, int numberOfLocks) throws CacheException
key
-
CacheException
public static void shutdownAndWaitForTermination(ExecutorService pool, int waitSeconds) throws TimeoutException
pool
- Pool to shutdownwaitSeconds
- Seconds to wait before throwing exception
TimeoutException
- Thrown if the pool does not shutdown in the specified time
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |