Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jgroups.util
Class TimeScheduler2.MyTask

    java.lang.Object
      org.jgroups.util.TimeScheduler2.MyTask

All Implemented Interfaces:
  java.lang.Runnable, java.util.concurrent.Future

Enclosing class:
  TimeScheduler2

    protected static class TimeScheduler2.MyTask

extends java.lang.Object
implements java.util.concurrent.Future, java.lang.Runnable

Simple task wrapper, always executed by at most 1 thread.

Field Summary
`protected boolean` | `cancelled`
`protected boolean` | `done`
`protected TimeScheduler2.MyTask` | `next`
`protected java.lang.Runnable` | `task`

Constructor Summary
`TimeScheduler2.MyTask(java.lang.Runnable task)`

Method Summary
`boolean` | `cancel(boolean mayInterruptIfRunning)`
`java.lang.Object` | `get()`
`java.lang.Object` | `get(long timeout, java.util.concurrent.TimeUnit unit)`
`boolean` | `isCancelled()`
`boolean` | `isDone()`
`void` | `run()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### task

    protected final java.lang.Runnable task

### cancelled

    protected volatile boolean cancelled

### done

    protected volatile boolean done

### next

    protected TimeScheduler2.MyTask next

Constructor Detail

### TimeScheduler2.MyTask

    public TimeScheduler2.MyTask(java.lang.Runnable task)

Method Detail

### cancel

    public boolean cancel(boolean mayInterruptIfRunning)

  Specified by:
    `cancel` in interface `java.util.concurrent.Future`

### isCancelled

    public boolean isCancelled()

  Specified by:
    `isCancelled` in interface `java.util.concurrent.Future`

### isDone

    public boolean isDone()

  Specified by:
    `isDone` in interface `java.util.concurrent.Future`

### get

    public java.lang.Object get()
                         throws java.lang.InterruptedException,
                                java.util.concurrent.ExecutionException

  Specified by:
    `get` in interface `java.util.concurrent.Future`
  Throws:
    `java.lang.InterruptedException`
    `java.util.concurrent.ExecutionException`

### get

    public java.lang.Object get(long timeout,
                                java.util.concurrent.TimeUnit unit)
                         throws java.lang.InterruptedException,
                                java.util.concurrent.ExecutionException,
                                java.util.concurrent.TimeoutException

  Specified by:
    `get` in interface `java.util.concurrent.Future`
  Throws:
    `java.lang.InterruptedException`
    `java.util.concurrent.ExecutionException`
    `java.util.concurrent.TimeoutException`

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.