Package com.oracle.coherence.common.base
Interface Pollable<E>
-
public interface Pollable<E>The Pollable interface describes a component which supports element removal.- Author:
- mf 2013.02.19
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Epoll()Removes and returns the next element, or returns null if none is present.Epoll(long timeout, TimeUnit unit)Removes and returns the next element, or returns null upon timeout.
-
-
-
Method Detail
-
poll
E poll()
Removes and returns the next element, or returns null if none is present.- Returns:
- the next element or null
-
poll
E poll(long timeout, TimeUnit unit) throws InterruptedException
Removes and returns the next element, or returns null upon timeout.- Parameters:
timeout- how long to wait before giving up, in units of unitunit- a TimeUnit determining how to interpret the timeout parameter- Returns:
- the next element or null
- Throws:
InterruptedException- if interrupted while waiting
-
-