Interface TraceStorageStrategy
-
- All Known Implementing Classes:
LongestTraceStorageStrategy
,ReservoirTraceStorageStrategy
public interface TraceStorageStrategy
An interface for objects that will choose from a collection of request traces which one needs removing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequestTrace
getTraceForRemoval(Collection<RequestTrace> traces, int maxSize, RequestTrace traceToRemove)
Get the trace that needs removing suggesting a candidate that should be chosen in case it is contained in the given list of traces.
-
-
-
Method Detail
-
getTraceForRemoval
RequestTrace getTraceForRemoval(Collection<RequestTrace> traces, int maxSize, RequestTrace traceToRemove)
Get the trace that needs removing suggesting a candidate that should be chosen in case it is contained in the given list of traces.- Parameters:
traces
- the list of traces to test.maxSize
- the maximum size of the list.traceToRemove
- the trace to remove if present or null if no particular candidate if favoured- Returns:
- the trace that needs removing, or null if no traces need removing.
-
-