com.netflix.eventbus.spi
Enum Subscribe.BatchingStrategy

java.lang.Object
  extended by java.lang.Enum<Subscribe.BatchingStrategy>
      extended by com.netflix.eventbus.spi.Subscribe.BatchingStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Subscribe.BatchingStrategy>
Enclosing class:
Subscribe

public static enum Subscribe.BatchingStrategy
extends java.lang.Enum<Subscribe.BatchingStrategy>

Batching strategy for event batches.


Enum Constant Summary
Age
          The events will be batched based on the time elapsed between the addition of the first entry and now.
None
          No batching, the events will be dispatched one at a time.
SizeOrAge
          The events will be dispatched if the number of events in the batch exceeds the threshold as defined by Subscribe.batchSize() or the age as defined by Subscribe.batchAge().
 
Method Summary
static Subscribe.BatchingStrategy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Subscribe.BatchingStrategy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Age

public static final Subscribe.BatchingStrategy Age
The events will be batched based on the time elapsed between the addition of the first entry and now. The time is always in milliseconds and is defined by the property Subscribe.batchAge()


SizeOrAge

public static final Subscribe.BatchingStrategy SizeOrAge
The events will be dispatched if the number of events in the batch exceeds the threshold as defined by Subscribe.batchSize() or the age as defined by Subscribe.batchAge().


None

public static final Subscribe.BatchingStrategy None
No batching, the events will be dispatched one at a time.

Method Detail

values

public static Subscribe.BatchingStrategy[] 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 (Subscribe.BatchingStrategy c : Subscribe.BatchingStrategy.values())
    System.out.println(c);

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

valueOf

public static Subscribe.BatchingStrategy valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null