Rice Pastry API

rice.p2p.util
Class AttachableCancellable

java.lang.Object
  extended by rice.p2p.util.AttachableCancellable
All Implemented Interfaces:
Cancellable

public class AttachableCancellable
extends java.lang.Object
implements Cancellable

Allows you to cancel a group of things. If you attach to a cancelled item, it gets cancelled now.

Author:
Jeff Hoye

Constructor Summary
AttachableCancellable()
           
 
Method Summary
 void attach(Cancellable c)
           
 boolean cancel()
          Returns false if any are false;
 void detach(Cancellable c)
           
 boolean isCancelled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachableCancellable

public AttachableCancellable()
Method Detail

isCancelled

public boolean isCancelled()

cancel

public boolean cancel()
Returns false if any are false;

Specified by:
cancel in interface Cancellable
Returns:
true if it was cancelled, false if it was already complete, or cancelled.

attach

public void attach(Cancellable c)

detach

public void detach(Cancellable c)

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection