net.sourceforge.domian.util.concurrent.task
Class Task

java.lang.Object
  extended by net.sourceforge.domian.util.slf4j.AbstractLoggingObject
      extended by net.sourceforge.domian.util.concurrent.task.Task
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
PartitionRepositoryTask, PersistentRepositoryTask, RepositoryTask

public abstract class Task
extends AbstractLoggingObject
implements java.lang.Runnable

Abstract super class for tasks to be executed by a ConcurrentTaskExecutor.

Since:
0.4
Author:
Eirik Torske

Field Summary
protected  java.util.concurrent.CyclicBarrier barrier
           
protected  java.lang.Integer threadNumber
           
protected static java.util.concurrent.atomic.AtomicInteger threadNumberGenerator
           
 
Constructor Summary
Task()
           
 
Method Summary
abstract  void doConcurrentTask()
           
static void resetThreadNumber()
           
 void run()
           
(package private)  void setBarrier(java.util.concurrent.CyclicBarrier barrier)
           
 
Methods inherited from class net.sourceforge.domian.util.slf4j.AbstractLoggingObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadNumberGenerator

protected static final java.util.concurrent.atomic.AtomicInteger threadNumberGenerator

threadNumber

protected final java.lang.Integer threadNumber

barrier

protected java.util.concurrent.CyclicBarrier barrier
Constructor Detail

Task

public Task()
Method Detail

resetThreadNumber

public static void resetThreadNumber()

setBarrier

void setBarrier(java.util.concurrent.CyclicBarrier barrier)

doConcurrentTask

public abstract void doConcurrentTask()

run

public final void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2006-2009. All Rights Reserved.