Package omero.util
Class Resources
- java.lang.Object
-
- omero.util.Resources
-
public class Resources extends java.lang.Object
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Resources.Entry
Interface to be implemented by any object which wants to be managed by theResources
class.
-
Constructor Summary
Constructors Constructor Description Resources()
AsResources(int)
but specifies a 60 second sleep period between task execution.Resources(int sleeptimeSeconds)
AsResources(int, ScheduledExecutorService)
but uses aExecutors.newSingleThreadExecutor()
.Resources(int sleeptimeSeconds, java.util.concurrent.ScheduledExecutorService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Resources.Entry entry)
void
cleanup()
void
remove(Resources.Entry entry)
int
size()
-
-
-
Constructor Detail
-
Resources
public Resources()
AsResources(int)
but specifies a 60 second sleep period between task execution.
-
Resources
public Resources(int sleeptimeSeconds)
AsResources(int, ScheduledExecutorService)
but uses aExecutors.newSingleThreadExecutor()
.
-
Resources
public Resources(int sleeptimeSeconds, java.util.concurrent.ScheduledExecutorService service)
-
-
Method Detail
-
add
public void add(Resources.Entry entry)
-
size
public int size()
-
cleanup
public void cleanup()
-
remove
public void remove(Resources.Entry entry)
-
-