org.jets3t.service.multi
Class ThreadedStorageService.ThreadGroupManager

java.lang.Object
  extended by org.jets3t.service.multi.ThreadedStorageService.ThreadGroupManager
Enclosing class:
ThreadedStorageService

protected abstract class ThreadedStorageService.ThreadGroupManager
extends java.lang.Object

The thread group manager is responsible for starting, running and stopping the set of threads required to perform an operation.

The manager starts all the threads, monitors their progress and stops threads when they are cancelled or an error occurs - all the while firing the appropriate ServiceEvent event notifications.


Constructor Summary
ThreadedStorageService.ThreadGroupManager(ThreadedStorageService.AbstractRunnable[] runnables, ThreadWatcher threadWatcher, Jets3tProperties jets3tProperties, boolean isAdminTask)
           
 
Method Summary
abstract  void fireCancelEvent()
           
abstract  void fireCompletedEvent()
           
abstract  void fireErrorEvent(java.lang.Throwable t)
           
abstract  void fireIgnoredErrorsEvent(ThreadWatcher threadWatcher, java.lang.Throwable[] ignoredErrors)
           
abstract  void fireProgressEvent(ThreadWatcher threadWatcher, java.util.List completedResults)
           
abstract  void fireStartEvent(ThreadWatcher threadWatcher)
           
 void run()
          Runs and manages all the threads involved in a multi-operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadedStorageService.ThreadGroupManager

public ThreadedStorageService.ThreadGroupManager(ThreadedStorageService.AbstractRunnable[] runnables,
                                                 ThreadWatcher threadWatcher,
                                                 Jets3tProperties jets3tProperties,
                                                 boolean isAdminTask)
Method Detail

run

public void run()
Runs and manages all the threads involved in a multi-operation.


fireStartEvent

public abstract void fireStartEvent(ThreadWatcher threadWatcher)

fireProgressEvent

public abstract void fireProgressEvent(ThreadWatcher threadWatcher,
                                       java.util.List completedResults)

fireCompletedEvent

public abstract void fireCompletedEvent()

fireCancelEvent

public abstract void fireCancelEvent()

fireErrorEvent

public abstract void fireErrorEvent(java.lang.Throwable t)

fireIgnoredErrorsEvent

public abstract void fireIgnoredErrorsEvent(ThreadWatcher threadWatcher,
                                            java.lang.Throwable[] ignoredErrors)