|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPollserver.Run
@ThreadSafe public final class Pollserver.Run
A run of the pollserver.
| Field Summary | |
|---|---|
AtomicReference<Thread> |
constructionThreadA
|
(package private) ReentrantLock |
singleServiceLock
|
| Constructor Summary | |
|---|---|
Pollserver.Run(boolean isSingleThreaded)
Constructs a Run. |
|
| Method Summary | ||
|---|---|---|
Geocode.Table |
geocodeTable()
The relational cache of geocoded residential addresses. |
|
Database |
getOrInitializeDatabase(Database keyDatabase)
Returns an already-initialized instance of the specified keyDatabase. |
|
void |
init_done()
Records that initialization is complete - that no further calls will be made to init_ methods. |
|
void |
init_ensureAllVoterServices()
Ensures that all voter services of the pollserver are created and stored for later retrieval. |
|
|
init_ensureVoterService(File startupConfigurationFile,
Class<S> serviceClass)
Returns a voter service, creating it if necessary, and storing it for later retrieval. |
|
void |
init_putVoterService(VoterService service)
Stores a voter service in this run, for later retrieval. |
|
boolean |
isSingleThreaded()
Returns true if this run is restricted to a single client thread; false if multiple client threads are allowed. |
|
VoterService[] |
newVoterServiceArray()
Returns all voter services provided in this run. |
|
Database |
outputDatabase()
The database for storing the relational parts of the output store, such as mounted voter lists and poll counts. |
|
Pollserver |
pollserver()
The pollserver for this run. |
|
Register |
register()
The voter register for this pollserver. |
|
Poll.PollserverScope.Run |
scopePoll()
API for all polls within the scope of this pollserver run. |
|
ReentrantLock |
singleServiceLock()
Returns the thread access lock shared by all services; or null if all services do not share the same lock. |
|
UserSettings.Table |
userTable()
The relational store of service preferences and other settings, for the users of this pollserver. |
|
Database |
voterInputDatabase()
The database of voter input for all voter services. |
|
VoterService |
voterService(String name)
Returns a voter service provided in this run. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Warning(value="non-API") public final AtomicReference<Thread> constructionThreadA
final ReentrantLock singleServiceLock
| Constructor Detail |
|---|
public Pollserver.Run(boolean isSingleThreaded)
throws IOException,
ScriptException,
SQLException
isSingleThreaded - per isSingleThreaded() -
if false (multi-threaded), the client should call
init_done() after initialization is complete
IOException
ScriptException
SQLException| Method Detail |
|---|
public void init_done()
@ThreadRestricted(value="constructor")
public void init_ensureAllVoterServices()
throws IOException,
ScriptException,
SQLException
IOException
ScriptException
SQLExceptioninit_ensureVoterService(File,Class)
@ThreadRestricted(value="constructor")
public <S extends VoterService> S init_ensureVoterService(File startupConfigurationFile,
Class<S> serviceClass)
throws IOException,
ScriptException,
SQLException
startupConfigurationFile - the startup configuration file for the serviceserviceClass - the class of the service
VoterService.NoSuchServiceException - if startupConfigurationFile does not exist
IOException
ScriptException
SQLExceptioninit_ensureAllVoterServices(),
init_putVoterService(VoterService),
voterService(String)@ThreadRestricted(value="constructor") public void init_putVoterService(VoterService service)
IllegalStateException - if an instance
of the same service was already storedinit_ensureVoterService(File,Class),
voterService(String),
init_ensureAllVoterServices()@Warning(value="thread restricted object") public Geocode.Table geocodeTable()
Pollserver.ConstructionContext.geocodeDatabase()
public Database getOrInitializeDatabase(Database keyDatabase)
throws ScriptException,
SQLException
keyDatabase - a database (typically uninitialized),
to use as a key in searching for an already
initialized instance of the same database in the cache
ScriptException
SQLExceptionpublic boolean isSingleThreaded()
public VoterService[] newVoterServiceArray()
voterService(String)@Warning(value="thread restricted object") public Database outputDatabase()
Pollserver.ConstructionContext.outputDatabase()public Pollserver pollserver()
@Warning(value="thread restricted object") public Register register()
public Poll.PollserverScope.Run scopePoll()
public ReentrantLock singleServiceLock()
VoterService.lock()@Warning(value="thread restricted object") public UserSettings.Table userTable()
Pollserver.ConstructionContext.userDatabase()@Warning(value="thread restricted object") public Database voterInputDatabase()
VoterInputTable,
Pollserver.ConstructionContext.voterInputDatabase()public VoterService voterService(String name)
name - per VoterService.name()init_ensureVoterService(File,Class),
init_putVoterService(VoterService),
newVoterServiceArray(),
Poll.PollserverScope.Run.districtDivisionalChildren(String)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||