com.genesyslab.platform.commons.threading
Class Slot<T>
java.lang.Object
com.genesyslab.platform.commons.threading.Slot<T>
public class Slot<T>
- extends java.lang.Object
A one-slot buffer.
Constructor Summary |
Slot()
|
Method Summary |
boolean |
offer(T o)
|
boolean |
offer(T o,
long timeoutMilis)
|
boolean |
offer(T o,
long timeout,
java.util.concurrent.TimeUnit unit)
|
T |
peek()
|
T |
poll(long timeoutMillis)
|
T |
poll(long timeout,
java.util.concurrent.TimeUnit unit)
|
void |
put(T o)
|
T |
take()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Slot
public Slot()
offer
public boolean offer(T o)
offer
public boolean offer(T o,
long timeoutMilis)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
offer
public boolean offer(T o,
long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
poll
public T poll(long timeoutMillis)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
poll
public T poll(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
take
public T take()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
put
public void put(T o)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
peek
public T peek()
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.