|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<ILnkPeerEndpoint.FlushContext.FlushMode>
com.neeve.link.ILnkPeerEndpoint.FlushContext.FlushMode
public static enum ILnkPeerEndpoint.FlushContext.FlushMode
Flush modes.
Enum Constant Summary | |
---|---|
ASYNC
Asynchronous flush mode. |
|
SYNC_BLOCKING
Synchronous blocking flush mode. |
|
SYNC_NON_BLOCKING
Synchronous non-blocking flush mode. |
Method Summary | |
---|---|
static ILnkPeerEndpoint.FlushContext.FlushMode |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ILnkPeerEndpoint.FlushContext.FlushMode[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ILnkPeerEndpoint.FlushContext.FlushMode SYNC_BLOCKING
This is the default flushing mode. When a user specifies this
flush mode to the ILnkPeerEndpoint.enque(short, com.neeve.pkt.PktPacket, com.neeve.link.ILnkPeerEndpoint.FlushContext, int)
method or the ILnkPeerEndpoint.flush(short, com.neeve.link.ILnkPeerEndpoint.FlushContext)
method, the endpoint will block until all enqueued packets
have been flushed from the endpoint.
public static final ILnkPeerEndpoint.FlushContext.FlushMode SYNC_NON_BLOCKING
When a user specifies this flush mode to the ILnkPeerEndpoint.enque(short, com.neeve.pkt.PktPacket, com.neeve.link.ILnkPeerEndpoint.FlushContext, int)
method
or the ILnkPeerEndpoint.flush(short, com.neeve.link.ILnkPeerEndpoint.FlushContext)
method, the endpoint will attempt to flush
the enqueued packets to the remote endpoint. However, in case it
is unable to do so (due to congestion or any other reason), it
does not block and wait for the congestion to abate before it
returns to the caller. It returns immediately to the caller even
if all the enqueued packets have not been flushed.
public static final ILnkPeerEndpoint.FlushContext.FlushMode ASYNC
When a user specifies this flush mode, as with the synchronous non-blocking flush mode, the endpoint will attempt to flush the enqueued packets to the remote endpoint and is unable to do do will return immediately to the caller. However, in this mode, before returning, the endpoint will setup the flush to complete asynchronously in the background driven by a dispatcher provided by the caller. In case the flush needs to complete asynchronously, the caller is responsible for driving the dispatcher after the enque or flush call returns to complete the flush.
Method Detail |
---|
public static ILnkPeerEndpoint.FlushContext.FlushMode[] values()
for (ILnkPeerEndpoint.FlushContext.FlushMode c : ILnkPeerEndpoint.FlushContext.FlushMode.values()) System.out.println(c);
public static ILnkPeerEndpoint.FlushContext.FlushMode valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |