|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.concurrent.ContinuationStage
public class ContinuationStage
Constructor Summary | |
---|---|
ContinuationStage(java.lang.String name,
int numThreads)
|
Method Summary | |
---|---|
java.util.concurrent.Future<java.lang.Object> |
execute(java.util.concurrent.Callable<java.lang.Object> callable)
This method is used to execute a piece of code on this stage which returns a Future pointer. |
void |
execute(java.lang.Runnable runnable)
This method is used to execute a piece of code on this stage. |
java.util.concurrent.ExecutorService |
getInternalThreadPool()
Get the thread pool used by this stage internally. |
java.lang.String |
getName()
Get the name of the associated stage. |
long |
getPendingTasks()
This method returns the number of tasks that are pending on this stage to be executed. |
boolean |
isShutdown()
Checks if the stage has been shutdown. |
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
This method is used to submit tasks to this stage that execute periodically. |
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
This method is used to submit tasks to this stage that execute periodically. |
java.util.concurrent.ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
This method is used to submit tasks to this stage that execute periodically. |
void |
shutdown()
Shutdown the stage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContinuationStage(java.lang.String name, int numThreads)
Method Detail |
---|
public java.lang.String getName()
IStage
getName
in interface IStage
public java.util.concurrent.ExecutorService getInternalThreadPool()
IStage
getInternalThreadPool
in interface IStage
public java.util.concurrent.Future<java.lang.Object> execute(java.util.concurrent.Callable<java.lang.Object> callable)
IStage
execute
in interface IStage
callable
- instance that needs to be invoked.
public void execute(java.lang.Runnable runnable)
IStage
execute
in interface IStage
runnable
- instance whose run() method needs to be invoked.public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
IStage
schedule
in interface IStage
command
- the task to execute.delay
- the time to delay first executionunit
- the time unit of the initialDelay and period parameters
public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
IStage
scheduleAtFixedRate
in interface IStage
command
- the task to execute.initialDelay
- the time to delay first executionperiod
- the period between successive executionsunit
- the time unit of the initialDelay and period parameters
public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
IStage
scheduleWithFixedDelay
in interface IStage
command
- the task to execute.initialDelay
- the time to delay first executiondelay
- the delay between the termination of one execution and the commencement of the next.unit
- the time unit of the initialDelay and delay parameters
public void shutdown()
IStage
shutdown
in interface IStage
public boolean isShutdown()
IStage
isShutdown
in interface IStage
public long getPendingTasks()
IStage
getPendingTasks
in interface IStage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |