@ThreadSafe public class Count extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Count.VoteServerScope
API for all counts within the scope of a vote-server.
|
Modifier | Constructor and Description |
---|---|
protected |
Count(Count count)
Constructs a count as a copy of another.
|
(package private) |
Count(String pollName,
ReadyDirectory readyDirectory,
long _baseCandidateCount,
long _candidateCount,
long _castVolume,
long _rankCount)
Partially constructs a Count, for init to finish.
|
Modifier and Type | Method and Description |
---|---|
long |
baseCandidateCount()
The number of base candidate nodes.
|
long |
candidateCount()
The number of candidate nodes.
|
long |
castVolume()
The total volume of votes cast.
|
CountTable |
countTable()
The relational store of count nodes that (in part) backs this count, if known.
|
CountTable.PollView |
countTablePV()
The poll view of the count table, if known.
|
long |
holdVolume()
The total volume of votes held.
|
(package private) void |
init(CountTable countTable)
Completes the construction of a new Count.
|
(package private) boolean |
isObjectReadFromSerialFile(ReadyDirectory newReadyDirectory)
Returns true if this count is probably in sync with the serial file of the
specified ready directory; false if that file has since been modified or deleted.
|
long |
msEndSnap()
The time at which the snapshot of voter input was complete, in milliseconds since
the 'epoch'; or Long.MAX_VALUE if the time is unknown.
|
long |
msStartSnap()
The time at which the snapshot of voter input commenced, in milliseconds since the
'epoch'; or zero if the time is unknown.
|
String |
pollName()
The poll identifier for this count.
|
long |
rankCount()
The total number of ranks.
|
(package private) static Count |
readObjectFromSerialFile(String pollName,
ReadyDirectory readyDirectory) |
ReadyDirectory |
readyDirectory()
The file part of the backing for this count.
|
(package private) void |
writeObjectToSerialFile() |
Count(String pollName, ReadyDirectory readyDirectory, long _baseCandidateCount, long _candidateCount, long _castVolume, long _rankCount) throws IOException
IOException
candidateCount()
,
rankCount()
,
castVolume()
@ThreadRestricted(value="constructor") final void init(CountTable countTable)
countTable()
final boolean isObjectReadFromSerialFile(ReadyDirectory newReadyDirectory)
static Count readObjectFromSerialFile(String pollName, ReadyDirectory readyDirectory) throws IOException
FileNotFoundException
- if the count does not include the named poll.IOException
final void writeObjectToSerialFile() throws IOException
IOException
public final long baseCandidateCount()
public final long candidateCount()
public long castVolume()
CountNodeW.castVolume()
public final CountTable countTable()
VoteServer.Run.database()
,
init(CountTable)
public final CountTable.PollView countTablePV()
init(CountTable)
public final long holdVolume()
CountNodeW.holdVolume()
public long msEndSnap()
System.currentTimeMillis()
public long msStartSnap()
System.currentTimeMillis()
public final long rankCount()
public final ReadyDirectory readyDirectory()