omero.util
Class Resources

java.lang.Object
  extended by omero.util.Resources

public class Resources
extends 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 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

Resources

public Resources()
As Resources(int) but specifies a 60 second sleep period between task execution.


Resources

public Resources(int sleeptimeSeconds)
As Resources#Resources(int, ExecutorService) but uses a Executors.newSingleThreadExecutor().


Resources

public Resources(int sleeptimeSeconds,
                 ScheduledExecutorService service)
Parameters:
sleeptimeSeconds -
service -
Method Detail

add

public void add(Resources.Entry entry)

size

public int size()

cleanup

public void cleanup()

remove

protected void remove(Resources.Entry entry)


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.