hunt-raft ~master (2020-07-15T10:51:20Z)
Home
Dub
Repo
Node
common
raft
node
Undocumented in source.
class
Node {
ulong
ID
;
MemoryStorage
storage
;
RawNode
node
;
bool
join
;
ulong
lastIndex
;
ConfState
confstate
;
ulong
snapshotIndex
;
ulong
appliedIndex
;
DataStorage
store
;
this
(ulong ID, MemoryStorage storage, RawNode node, DataStorage store, ulong lastIndex, ConfState confstate, ulong snapshotIndex, ulong appliedIndex);
void
publishSnapshot
(Snapshot snap);
Entry
[]
entriesToApply
(Entry[] ents);
void
maybeTriggerSnapshot
();
bool
publishEntries
(Entry[] ents);
}
Constructors
this
this
(ulong ID, MemoryStorage storage, RawNode node, DataStorage store, ulong lastIndex, ConfState confstate, ulong snapshotIndex, ulong appliedIndex)
Undocumented in source.
Members
Functions
entriesToApply
Entry
[]
entriesToApply
(Entry[] ents)
Undocumented in source. Be warned that the author may not have intended to support it.
maybeTriggerSnapshot
void
maybeTriggerSnapshot
()
Undocumented in source. Be warned that the author may not have intended to support it.
publishEntries
bool
publishEntries
(Entry[] ents)
Undocumented in source. Be warned that the author may not have intended to support it.
publishSnapshot
void
publishSnapshot
(Snapshot snap)
Undocumented in source. Be warned that the author may not have intended to support it.
Variables
ID
ulong
ID
;
Undocumented in source.
appliedIndex
ulong
appliedIndex
;
Undocumented in source.
confstate
ConfState
confstate
;
Undocumented in source.
join
bool
join
;
Undocumented in source.
lastIndex
ulong
lastIndex
;
Undocumented in source.
node
RawNode
node
;
Undocumented in source.
snapshotIndex
ulong
snapshotIndex
;
Undocumented in source.
storage
MemoryStorage
storage
;
Undocumented in source.
store
DataStorage
store
;
Undocumented in source.
Meta
Source
See Implementation
common
raft
node
classes
Node
manifest constants
defaultSnapCount
snapshotCatchUpEntriesN