org.duracloud.services.fixity.worker
Class ServiceWorkManager

java.lang.Object
  extended by java.lang.Thread
      extended by org.duracloud.services.fixity.worker.ServiceWorkManager
All Implemented Interfaces:
Runnable, CountListener

public class ServiceWorkManager
extends Thread
implements CountListener

Author:
Andrew Woods Date: Aug 4, 2010

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  CountDownLatch doneWorking
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ServiceWorkManager(ServiceWorkload workload, ServiceWorkerFactory workerFactory, ServiceResultListener resultListener, int threads, CountDownLatch doneWorking)
           
 
Method Summary
 String getProcessingStatus()
           
 void run()
           
 void setCount(long count)
           
 void stopProcessing()
          Indicate that service should stop after the items currently being processed have completed.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

doneWorking

protected final CountDownLatch doneWorking
Constructor Detail

ServiceWorkManager

public ServiceWorkManager(ServiceWorkload workload,
                          ServiceWorkerFactory workerFactory,
                          ServiceResultListener resultListener,
                          int threads,
                          CountDownLatch doneWorking)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getProcessingStatus

public String getProcessingStatus()

stopProcessing

public void stopProcessing()
Indicate that service should stop after the items currently being processed have completed.


setCount

public void setCount(long count)
Specified by:
setCount in interface CountListener


Copyright © 2009-2011 DuraSpace. All Rights Reserved.