|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface Pool extends java.io.Closeable
See discussion at http://code.google.com/p/guava-libraries/issues/detail?id=683. This API is inspired by that proposed by kevinb
PoolOr active:pool = ... Lease finally { lease.close(); } }lease = pool.leaseObject(); try { Expensive o = lease.leasedObject(); doSomethingWith(o);
Poolpool = ... pool.exec( new Function }); }() { public Void apply(Expensive o) { doSomethingWith(o); return null;
Method Summary | |
---|---|
void
|
close()
|
R
|
exec(Function receiver)
|
Lease
|
leaseObject()
|
Methods inherited from interface java.io.Closeable | |
---|---|
java.io.Closeable#close() |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
public void close()
public R exec(Function receiver)
public Lease leaseObject()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.