|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AcquirableResource<T extends Releasable>
A wrapper around a resource that can be released. Note, release should not be called directly on the resource itself.
Yea, I now, the fact that the resouce itself is releasable basically means that users of this class should take care... .
Method Summary | |
---|---|
boolean |
acquire()
Acquires the resource, returning true if it was acquired. |
void |
forceClose()
Forces the resource to be closed, regardless of the number of acquirers. |
void |
markForClose()
Marks the resource to be closed. |
void |
release()
Releases the resource, will close it if there are no more acquirers and it is marked for close. |
T |
resource()
|
Method Detail |
---|
T resource()
boolean acquire()
void release()
void markForClose()
void forceClose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |