Class LinearizabilityChecker.History
java.lang.Object
org.elasticsearch.cluster.coordination.LinearizabilityChecker.History
- Enclosing class:
- LinearizabilityChecker
Sequence of invocations and responses, recording the run of a concurrent system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
void
Completes the history with response events for invocations that are missing corresponding responsesCopy the list of events for external use.int
Appends a new invocation event to the historyvoid
remove
(int id) Removes the events with the corresponding id from the historyvoid
Appends a new response event to the historyint
size()
Returns the number of recorded eventstoString()
-
Constructor Details
-
History
public History() -
History
-
-
Method Details
-
invoke
Appends a new invocation event to the history- Parameters:
input
- the input value associated with the invocation event- Returns:
- an id that can be used to record the corresponding response event
-
respond
Appends a new response event to the history- Parameters:
id
- the id of the corresponding invocation eventoutput
- the output value associated with the response event
-
remove
public void remove(int id) Removes the events with the corresponding id from the history- Parameters:
id
- the value of the id to remove
-
copyEvents
Copy the list of events for external use.- Returns:
- list of events in the order recorded.
-
complete
Completes the history with response events for invocations that are missing corresponding responses- Parameters:
missingResponseGenerator
- a function from invocation input to response output, used to generate the corresponding response
-
clone
-
size
public int size()Returns the number of recorded events -
toString
-