Remote System Explorer DataStore
Release 3.4

org.eclipse.dstore.core.miners
Class MinerThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.eclipse.dstore.core.server.SecuredThread
          extended by org.eclipse.dstore.core.miners.MinerThread
All Implemented Interfaces:
Runnable

public abstract class MinerThread
extends SecuredThread

MinerThread is a utility class used for doing threaded operations in a miner.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  boolean _isCancelled
           
 
Fields inherited from class org.eclipse.dstore.core.server.SecuredThread
_dataStore
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MinerThread()
          Constructor
MinerThread(DataStore dataStore)
          Constructor with dataStore.
 
Method Summary
abstract  void cleanupThread()
          Implement this method to provide any cleanup that is required after all the work is done.
abstract  boolean doThreadedWork()
          Implement this method to provide the work implementation of this thread.
abstract  void initializeThread()
          Implement this method to provide initialization of this thread.
 void run()
          runs the thread
 void stopThread()
          stops the thread
 
Methods inherited from class org.eclipse.dstore.core.server.SecuredThread
setDataStore, start
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_isCancelled

protected boolean _isCancelled
Constructor Detail

MinerThread

public MinerThread()
Constructor


MinerThread

public MinerThread(DataStore dataStore)
Constructor with dataStore.

Since:
3.0
Method Detail

stopThread

public void stopThread()
stops the thread


run

public void run()
runs the thread

Specified by:
run in interface Runnable
Overrides:
run in class SecuredThread

initializeThread

public abstract void initializeThread()
Implement this method to provide initialization of this thread.


doThreadedWork

public abstract boolean doThreadedWork()
Implement this method to provide the work implementation of this thread. This method gets called periodically by the miner thread so te work done here must be atomic. Each time this is called a incremental unit of work should be done. Once all the work is done, true should be returned.

Returns:
true if all the work is done.

cleanupThread

public abstract void cleanupThread()
Implement this method to provide any cleanup that is required after all the work is done.


Remote System Explorer DataStore
Release 3.4

Copyright (c) IBM Corporation and others 2000, 2012. All Rights Reserved.