com.neeve.sma
Enum MessageBusBinding.FlushContext.FlushMode

java.lang.Object
  extended by java.lang.Enum<MessageBusBinding.FlushContext.FlushMode>
      extended by com.neeve.sma.MessageBusBinding.FlushContext.FlushMode
All Implemented Interfaces:
Serializable, Comparable<MessageBusBinding.FlushContext.FlushMode>
Enclosing class:
MessageBusBinding.FlushContext

public static enum MessageBusBinding.FlushContext.FlushMode
extends Enum<MessageBusBinding.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 MessageBusBinding.FlushContext.FlushMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MessageBusBinding.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

SYNC_BLOCKING

public static final MessageBusBinding.FlushContext.FlushMode SYNC_BLOCKING
Synchronous blocking flush mode.

This is the default flushing mode. When a user specifies this flush mode to MessageChannel.sendMessage(com.neeve.sma.MessageView, java.util.Properties, com.neeve.sma.MessageBusBinding.FlushContext, int) method or the MessageBusBinding.flush(com.neeve.sma.MessageBusBinding.FlushContext) method, the binding will block until all enqueued messages have been flushed from the binding.


SYNC_NON_BLOCKING

public static final MessageBusBinding.FlushContext.FlushMode SYNC_NON_BLOCKING
Synchronous non-blocking flush mode.

When a user specifies this flush mode, the binding will attempt to transmit buffered messages. However, in case it is unable to do so (due to congestion or any other reason), it does not block and waits for the congestion to abate before it returns to the caller. It returns immediately to the caller even if all the buffered messages have not been flushed.


ASYNC

public static final MessageBusBinding.FlushContext.FlushMode ASYNC
Asynchronous flush mode.

When a user specifies this flush mode, the binding will attempt to transmit the buffered messages. If unable to do, the binding will return control immediately to the caller. However, before returning, the binding will setup the flush to complete in the background. The user will be notified of flush completion via a flush completion event (See com.neeve.sma.event).

Method Detail

values

public static MessageBusBinding.FlushContext.FlushMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MessageBusBinding.FlushContext.FlushMode c : MessageBusBinding.FlushContext.FlushMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MessageBusBinding.FlushContext.FlushMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.