Package org.zeromq
Class ZMQ.CancellationToken
- java.lang.Object
-
- org.zeromq.ZMQ.CancellationToken
-
- Enclosing class:
- ZMQ
public static class ZMQ.CancellationToken extends java.lang.ObjectA cancellation token that allows canceling ongoing Socket send/receive operations. When calling send/receive you can provide the cancellation token as an additional parameter. To create a cancellation token callZMQ.Socket.createCancellationToken().
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.atomic.AtomicBooleancanceled(package private) SocketBasesocket
-
Constructor Summary
Constructors Modifier Constructor Description protectedCancellationToken(SocketBase socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel a pending the send/receive operation.booleanisCancellationRequested()voidreset()Reset the cancellation token in order to reuse the token with another send/receive call.
-
-
-
Field Detail
-
canceled
protected java.util.concurrent.atomic.AtomicBoolean canceled
-
socket
SocketBase socket
-
-
Constructor Detail
-
CancellationToken
protected CancellationToken(SocketBase socket)
-
-