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 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(int maxSize)
Sets the maximum size of the store.
|
public RequestTrace addTrace(RequestTrace trace)
RequestTraceStoreInterface
addTrace
in interface RequestTraceStoreInterface
trace
- the trace to add.public RequestTrace addTrace(RequestTrace trace, RequestTrace traceToRemove)
RequestTraceStoreInterface
addTrace
in interface RequestTraceStoreInterface
trace
- The trace to addtraceToRemove
- The trace to remove if presentpublic Collection<RequestTrace> getTraces()
RequestTraceStoreInterface
getTraces
in interface RequestTraceStoreInterface
public Collection<RequestTrace> getTraces(int limit)
RequestTraceStoreInterface
getTraces
in interface RequestTraceStoreInterface
limit
- the maximum number of traces to return.public void setSize(int maxSize)
RequestTraceStoreInterface
setSize
in interface RequestTraceStoreInterface
maxSize
- the maximum size of the store.public int getStoreSize()
RequestTraceStoreInterface
getStoreSize
in interface RequestTraceStoreInterface
public Collection<RequestTrace> emptyStore()
RequestTraceStoreInterface
emptyStore
in interface RequestTraceStoreInterface
Copyright © 2018. All rights reserved.