akka.zeromq
Class Linger
java.lang.Object
akka.zeromq.Linger
- All Implemented Interfaces:
- Request, SocketOption, java.io.Serializable, scala.Equals, scala.Product
public class Linger
- extends java.lang.Object
- implements SocketOption, scala.Product, scala.Serializable
Configure this socket to have a linger of the specified value
The linger period determines how long pending messages which have yet to be sent to a peer shall linger
in memory after a socket is closed, and further affects the termination of the socket's context.
The following outlines the different behaviours:
- The default value of -1 specifies an infinite linger period.
Pending messages shall not be discarded after the socket is closed;
attempting to terminate the socket's context shall block until all pending messages
have been sent to a peer.
- The value of 0 specifies no linger period. Pending messages shall be discarded immediately when the socket is closed.
- Positive values specify an upper bound for the linger period in milliseconds.
Pending messages shall not be discarded after the socket is closed;
attempting to terminate the socket's context shall block until either all pending messages have been sent to a peer,
or the linger period expires, after which any pending messages shall be discarded.
- See Also:
- Serialized Form
Constructor Summary |
Linger(long value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface scala.Product |
productArity, productElement, productIterator, productPrefix |
Methods inherited from interface scala.Equals |
canEqual, equals |
Linger
public Linger(long value)
no
public static Linger no()
value
public long value()