Home » concurrent-sources » EDU.oswego.cs.dl.util.concurrent » [javadoc | source]
EDU.oswego.cs.dl.util.concurrent
public interface: Takable [javadoc | source]

All Known Implementing Classes:
    Channel, BoundedBuffer, WaitFreeQueue, SemaphoreControlledChannel, BoundedLinkedQueue, LinkedQueue, PipedChannel, SynchronousChannel, BoundedChannel, BoundedPriorityQueue, FIFOSlot, CVBuffer, Slot

This interface exists to enable stricter type checking for channels. A method argument or instance variable in a consumer object can be declared as only a Takable rather than a Channel, in which case a Java compiler will disallow put operations.

Full method descriptions appear in the Channel interface.

[ Introduction to this package. ]

Method from EDU.oswego.cs.dl.util.concurrent.Takable Summary:
poll,   take
Method from EDU.oswego.cs.dl.util.concurrent.Takable Detail:
 public Object poll(long msecs) throws InterruptedException
    Return and remove an item from channel only if one is available within msecs milliseconds. The time bound is interpreted in a coarse grained, best-effort fashion.
 public Object take() throws InterruptedException
    Return and remove an item from channel, possibly waiting indefinitely until such an item exists.