public class LocalRequestTraceStore extends Object implements RequestTraceStoreInterface
RequestTrace objects.
Stores the list locally.| 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.
|
void |
setSize(IntSupplier maxSize)
Sets the supplier for the maximum size of the store.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSharedpublic 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 RequestTraceStoreInterfaceCopyright © 2021. All rights reserved.