public static class SharableResource.Cluster<R extends SharableResource> extends Thread
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
protected |
Cluster(long ttp)
Create cluster of resource.
|
Modifier and Type | Method and Description |
---|---|
void |
add(R r)
Add a resource
|
void |
addAll(Collection<R> ress)
Add resource collection
|
protected void |
releaseResource(R r) |
protected R |
reserveResource() |
void |
run() |
void |
terminate() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected Cluster(long ttp)
ttp
- time to live [milliseconds] (automatically close resources which idling time exceed ttp).public void add(R r)
r
- Resourcepublic void addAll(Collection<R> ress)
ress
- Resourcespublic void terminate()
protected R reserveResource()
protected void releaseResource(R r)
EDB Working Group at Tue Jun 10 17:08:59 JST 2025