Votorola

votorola.a.register
Class VoterList

java.lang.Object
  extended by VoterList
All Implemented Interfaces:
Serializable

@ThreadSafe
public final class VoterList
extends Object
implements Serializable

A compiled list of voters from a voter register.

See Also:
Serialized Form

Constructor Summary
VoterList(Register register, ReadyDirectory readyDirectory)
          Partially constructs a VoterList, for init to finish.
 
Method Summary
(package private)  void init(ListNodeC.Table listNodeTable, Neighbourhood.Table neighbourhoodTable, TrustEdge.Table trustEdgeTable)
          Completes the construction of a new VoterList.
(package private)  boolean isObjectReadFromSerialFile(ReadyDirectory newReadyDirectory)
          Returns true if this list is probably in sync with the serial file of the specified ready directory; false if that file has since been modified or deleted.
 ListNodeC.Table listNodeTable()
          The relational store of voters that (in part) backs this list, or null.
 Neighbourhood.Table neighbourhoodTable()
          The relational store of neighbourhoods that (in part) backs this list, or null.
static VoterList readObjectFromSerialFile(ReadyDirectory readyDirectory)
           
 ReadyDirectory readyDirectory()
          The file part of the backing for this list.
 String summaryDescription()
          A brief description of this list, in sentence form.
 TrustEdge.Table trustEdgeTable()
          The relational store of trust edges that (in part) backs this list, or null.
(package private)  void writeObjectToSerialFile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VoterList

VoterList(Register register,
          ReadyDirectory readyDirectory)
Partially constructs a VoterList, for init to finish.

See Also:
readyDirectory()
Method Detail

init

@ThreadRestricted(value="constructor")
void init(ListNodeC.Table listNodeTable,
                                Neighbourhood.Table neighbourhoodTable,
                                TrustEdge.Table trustEdgeTable)
Completes the construction of a new VoterList.

See Also:
listNodeTable(), neighbourhoodTable(), trustEdgeTable()

isObjectReadFromSerialFile

boolean isObjectReadFromSerialFile(ReadyDirectory newReadyDirectory)
Returns true if this list is probably in sync with the serial file of the specified ready directory; false if that file has since been modified or deleted. Always returns false if the list was never originally deserialized from that file path.

See Also:
readObjectFromSerialFile(ReadyDirectory)

readObjectFromSerialFile

public static VoterList readObjectFromSerialFile(ReadyDirectory readyDirectory)
                                          throws IOException
Throws:
IOException
See Also:
writeObjectToSerialFile()

writeObjectToSerialFile

void writeObjectToSerialFile()
                       throws IOException
Throws:
IOException
See Also:
readObjectFromSerialFile(ReadyDirectory)

listNodeTable

public ListNodeC.Table listNodeTable()
The relational store of voters that (in part) backs this list, or null. It is a table named "SCHEMA_NAME.YYYY-MD-S-list_node-S", stored in the list database.

Returns:
reference to relational store; or null, if the list was not initialized with a reference
See Also:
Pollserver.Run.outputDatabase(), init(ListNodeC.Table,Neighbourhood.Table,TrustEdge.Table)

neighbourhoodTable

public Neighbourhood.Table neighbourhoodTable()
The relational store of neighbourhoods that (in part) backs this list, or null. It is a table named "SCHEMA_NAME.YYYY-MD-S-neighbourhood-S", stored in the list database.

Returns:
reference to relational store; or null, if the list was not initialized with a reference
See Also:
Pollserver.Run.outputDatabase(), init(ListNodeC.Table,Neighbourhood.Table,TrustEdge.Table)

readyDirectory

public ReadyDirectory readyDirectory()
The file part of the backing for this list.


summaryDescription

public String summaryDescription()
A brief description of this list, in sentence form. It is intended for display, for example, as an introductory paragraph. It ordinarilly specifies the bar criteria for the list - minimum trust level, residency, and so forth.

See Also:
Register.ConstructionContext.setListSummaryDescription(String)

trustEdgeTable

public TrustEdge.Table trustEdgeTable()
The relational store of trust edges that (in part) backs this list, or null. It is a table named "SCHEMA_NAME.YYYY-MD-S-trust_edge-S", stored in the list database.

Returns:
reference to relational store; or null, if the list was not initialized with a reference
See Also:
Pollserver.Run.outputDatabase(), init(ListNodeC.Table,Neighbourhood.Table,TrustEdge.Table)

Votorola