public class ClusteredRequestTraceStore extends Object implements RequestTraceStoreInterface, Serializable
RequestTrace objects.
Stores the list across a cluster.| Modifier and Type | Method and Description |
|---|---|
RequestTrace |
addTrace(RequestTrace trace)
Adds a request trace to the store.
|
RequestTrace |
addTrace(RequestTrace trace,
RequestTrace traceToRemove)
Adds a request trace to the store, removing the specified trace if present and necessary.
|
Collection<RequestTrace> |
emptyStore()
Removes all of the traces from the store.
|
int |
getStoreSize()
Gets the current size of the store.
|
Collection<RequestTrace> |
getTraces()
Gets the entire contents of the store.
|
Collection<RequestTrace> |
getTraces(int limit)
Gets the contents of the store, up to a limit number of items.
|
boolean |
isShared() |
void |
setSize(IntSupplier maxSize)
Sets the supplier for the maximum size of the store.
|
public RequestTrace addTrace(RequestTrace trace)
RequestTraceStoreInterfaceaddTrace in interface RequestTraceStoreInterfacetrace - the trace to add.public RequestTrace addTrace(RequestTrace trace, RequestTrace traceToRemove)
RequestTraceStoreInterfaceaddTrace in interface RequestTraceStoreInterfacetrace - The trace to addtraceToRemove - The trace to remove if presentpublic Collection<RequestTrace> getTraces()
RequestTraceStoreInterfacegetTraces in interface RequestTraceStoreInterfacepublic Collection<RequestTrace> getTraces(int limit)
RequestTraceStoreInterfacegetTraces in interface RequestTraceStoreInterfacelimit - the maximum number of traces to return.public void setSize(IntSupplier maxSize)
RequestTraceStoreInterfacesetSize in interface RequestTraceStoreInterfacemaxSize - A supplier for the maximum size of the store.public int getStoreSize()
RequestTraceStoreInterfacegetStoreSize in interface RequestTraceStoreInterfacepublic Collection<RequestTrace> emptyStore()
RequestTraceStoreInterfaceemptyStore in interface RequestTraceStoreInterfacepublic boolean isShared()
isShared in interface RequestTraceStoreInterfaceCopyright © 2020. All rights reserved.