List of usage examples for org.springframework.integration.util UpperBound UpperBound
public UpperBound(int capacity)
From source file:iwein.samples.store.SimpleMessageStore.java
/** * Creates a SimpleMessageStore with a maximum size limited by the given capacity, or unlimited size if the given * capacity is less than 1. The capacities are applied independently to messages stored via * {@link #addMessage(Message)} and to those stored via {@link #addMessageToGroup(Object, Message)}. In both cases * the capacity applies to the number of messages that can be stored, and once that limit is reached attempting to * store another will result in an exception. *///from w w w. j a v a2s .c om public SimpleMessageStore(int individualCapacity, int groupCapacity) { this.idToMessage = new ConcurrentHashMap<UUID, Message<?>>(); this.correlationToMessageGroup = new ConcurrentHashMap<Object, SimpleMessageGroup>(); this.individualUpperBound = new UpperBound(individualCapacity); this.groupUpperBound = new UpperBound(groupCapacity); }