|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectomero.util.Resources
public class Resources
Container class for storing resources which should be cleaned up on close and
periodically checked.
Note: this class uses java.util.logging (JUL) rather than commons-logging
since it may be used on the client-side. Any use server-side will have logs
forwarded to log4j via slf4j as described in
Entry.configureLogging()
Nested Class Summary | |
---|---|
static interface |
Resources.Entry
Interface to be implemented by any object which wants to be managed by the Resources class. |
Constructor Summary | |
---|---|
Resources()
As Resources(int) but specifies a 60 second sleep
period between task execution. |
|
Resources(int sleeptimeSeconds)
As Resources#Resources(int, ExecutorService) but uses a
Executors.newSingleThreadExecutor() . |
|
Resources(int sleeptimeSeconds,
ScheduledExecutorService service)
|
Method Summary | |
---|---|
void |
add(Resources.Entry entry)
|
void |
cleanup()
|
protected void |
remove(Resources.Entry entry)
|
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Resources()
Resources(int)
but specifies a 60 second sleep
period between task execution.
public Resources(int sleeptimeSeconds)
Resources#Resources(int, ExecutorService)
but uses a
Executors.newSingleThreadExecutor()
.
public Resources(int sleeptimeSeconds, ScheduledExecutorService service)
sleeptimeSeconds
- service
- Method Detail |
---|
public void add(Resources.Entry entry)
public int size()
public void cleanup()
protected void remove(Resources.Entry entry)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.3-00d1137e-b2894
Copyright © 2009 The University of Dundee. All Rights Reserved.