public class Terms
extends Object
Keeps track of all the terms in memory for efficient lookup.
The implementation favours lookup of recent entries.
Exposed methods shadow the regular RAFT log manipulation
functions and must be invoked from respective places.
During recovery truncate should be called between every segment
switch to "simulate" eventual truncations as a reason for switching
segments. It is ok to call truncate even if the reason was not a
truncation.