public final class CountJS extends JavaScriptObject
Count
Modifier and Type | Class and Description |
---|---|
static class |
CountJS.NodeRequestRecord
A cached record of a node request.
|
Modifier | Constructor and Description |
---|---|
protected |
CountJS() |
Modifier and Type | Method and Description |
---|---|
JsArray<CountNodeJS> |
baseCandidates()
A sparse array of the dart
sectored base candidates.
|
(package private) CountNodeJS |
cachedOrWireNode(String username,
JsMap<CountNodeJS> wiredNodes)
Returns a count node for the specified user, either fetching it from the cache or
initializing it from the server's response and then caching it.
|
(package private) void |
init(String pollName)
Initializes a count that was received on the wire.
|
static boolean |
isNodeRequestComplete(CountJS.NodeRequestRecord r)
Answers whether the node request is complete.
|
CountJS.NodeRequestRecord |
nodeRequestRecord(String username)
Returns a cached record of a node request, or null if no record is cached.
|
SacJS |
nullSuperaccount()
The superaccount for the null count.
|
String |
pollName()
Identifies the poll that was counted.
|
StringBuilder |
requestNode_loc(String username,
StringBuilder b)
Appends the location for calls to
requestNode and returns the string
builder. |
JsonpRequest<CountCache.WAPResponse> |
requestNode(String loc,
String username,
AsyncCallback<CountNodeJS> callback)
Requests a node and/or its direct voters from
the remote count engine and caches them.
|
<S extends SacJS> |
superaccount(String countingMethodName,
String accountName)
Returns the superaccount for the specified counting method and account name; or
null if no such superaccount exists.
|
<S extends SacJS> |
superaccounts()
Resource superaccounts for the entire count, indexed first by the page name of the
counting method, then by the account name.
|
String |
uiString()
A timestamped identifier based on count.
|
SacJS_v |
voteSuperaccount()
The vote superaccount.
|
_delete, _get, _getBoolean, _getByte, _getChar, _getDouble, _getFloat, _getInt, _getShort, _getString, _hasOwnProperty, _hasProperty, _propertyIsEnumerable, _set, _setBoolean, _setByte, _setChar, _setDouble, _setFloat, _setInt, _setShort, _setString, cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
protected CountJS()
void init(String pollName)
pollName()
CountNodeJS cachedOrWireNode(String username, JsMap<CountNodeJS> wiredNodes)
wiredNodes
- the "nodes" as received from CountWAP, including that of the specified user.public JsArray<CountNodeJS> baseCandidates()
public static boolean isNodeRequestComplete(CountJS.NodeRequestRecord r)
public CountJS.NodeRequestRecord nodeRequestRecord(String username)
public SacJS nullSuperaccount()
public JsonpRequest<CountCache.WAPResponse> requestNode(String loc, String username, AsyncCallback<CountNodeJS> callback)
username
- the personal name of the node.callback
- a receiver for the processed response.requestNode_loc(String,StringBuilder)
public StringBuilder requestNode_loc(String username, StringBuilder b)
requestNode
and returns the string
builder.public <S extends SacJS> S superaccount(String countingMethodName, String accountName)
public <S extends SacJS> JsMap<CountingMethodJS<S>> superaccounts()
CountWAP
public String uiString()
CountWAP
public SacJS_v voteSuperaccount()