Class MemoryExchangeStore
java.lang.Object
com.predic8.membrane.core.exchangestore.AbstractExchangeStore
com.predic8.membrane.core.exchangestore.MemoryExchangeStore
- All Implemented Interfaces:
ExchangeStore
TODO: thread-safety
- Description
- Stores all exchanges in-memory. The Java heap will overflow if this store is used to store too many Exchanges. Use for Membrane Monitor only.
-
Field Summary
Fields inherited from class com.predic8.membrane.core.exchangestore.AbstractExchangeStore
exchangesStoreListeners -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]getExchanges(RuleKey ruleKey) intgetNumberOfExchanges(RuleKey ruleKey) getStatistics(RuleKey key) voidremove(AbstractExchange exc) voidremoveAllExchanges(AbstractExchange[] exchanges) voidremoveAllExchanges(Rule rule) voidsnap(AbstractExchange exc, Interceptor.Flow flow) Adds the current state of the exchange to the store.Methods inherited from class com.predic8.membrane.core.exchangestore.AbstractExchangeStore
addExchangesStoreListener, collect, getClientStatistics, getExchangeById, getFilteredSortedPaged, getLastModified, getMax, init, notifyListenersOnExchangeAdd, notifyListenersOnExchangeRemoval, pathContains, refreshExchangeStoreListeners, removeExchangesStoreListener, requestHeaderContains, responseHeaderContains, waitForModification
-
Constructor Details
-
MemoryExchangeStore
public MemoryExchangeStore()
-
-
Method Details
-
snap
Description copied from interface:ExchangeStoreAdds the current state of the exchange to the store.Implementations should take a snapshot of the current state of the request (or response) headers and register a body observer in which they will be called back as soon as the body has fully been received.
If flow==REQUEST, the request is added. Elsewise, the response is added (if present).
-
remove
-
removeAllExchanges
-
getExchanges
-
getNumberOfExchanges
-
getStatistics
-
getAllExchanges
-
getAllExchangesAsList
-
removeAllExchanges
-