|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface BasicVarMgrInterface
Basic variable manager interface. The variable manager may or may not be part of a pipeline.
| Method Summary | |
|---|---|
EventVariableValue |
getEventValue(SimpleVariableDefinition def,
EventPeriod intervalSelector,
boolean current)
Get the current partial, or previous full, event set at the specified interval; never null. |
EventVariableValue[] |
getEventValues(SimpleVariableDefinition def,
EventPeriod intervalSelector,
long intervalNumber,
java.util.BitSet whichValues)
Get the specified event sets for the specified intervals; never null. |
SimpleVariableValue |
getVariable(SimpleVariableDefinition var)
Get a single variable value; returns null if no such value or wrong type. |
SimpleVariableValue[] |
getVariables(long changedSince)
Get set of variable values altered on or after specified time, or get all values with -1; never null. |
void |
setVariable(SimpleVariableValue newValue)
Set variable to the given value (the variable name and definition are implicit). |
int |
setVariables(SimpleVariableValue[] newValues)
Update a number of variables at once for efficiency; returns the number of variables set. |
| Method Detail |
|---|
void setVariable(SimpleVariableValue newValue)
throws java.io.IOException,
java.lang.UnsupportedOperationException
This is also used to send events, the last event value being the variable's value.
java.io.IOException - in case of I/O difficulty
java.lang.UnsupportedOperationException - if a variable is set that
we could never handle, eg a non-System-ID local variable at
the client end of a tunnel
int setVariables(SimpleVariableValue[] newValues)
throws java.io.IOException
Furthermore it behaves as if the set operations are done in order, from low index to high index, unless variables are coalesced (multiple sets of the same simple variable can keep just the last value). Set operations of different variables may be re-ordered with respect to one another in order that redundancy may reduced for transmission and storage, so this implicitly allows, for example, events to be re-ordered with respect to non-event variables.
An implementation may "fail fast" on the first error/exception, or may attempt to continue and do as much as possible.
An implementation may throw an IllegalArgumentException on attempt to: set a variable with value of wrong type or incompatible definition, set a non-existent or read-only variable (or these may be ignored)
java.io.IOException
SimpleVariableValue getVariable(SimpleVariableDefinition var)
throws java.io.IOException,
java.lang.UnsupportedOperationException
Only the last event value for a given event variable is returned by this method.
var - definition of variable to fetch; never null
java.io.IOException - in case of I/O difficulty
java.lang.UnsupportedOperationException - if a variable is requested that
we could never supply, eg a non-System-ID local variable at
the client end of a tunnel
SimpleVariableValue[] getVariables(long changedSince)
throws java.io.IOException
Only the last event value of each event variable is returned by this method.
java.io.IOException - in case of I/O difficulty
EventVariableValue getEventValue(SimpleVariableDefinition def,
EventPeriod intervalSelector,
boolean current)
The current set is the most timely, but may not contain enough data to be meaningful if the new interval has just started.
The previous set is complete and thus most likely to have enough samples to be useful, but is not completely current.
If the requested event set is not available, an empty non-authoritative synthetic one is created and returned. Thus, with this interface, it is not possible to distinguish between there being no events in the given interval or simply no data at all, but this is relatively simple and safe to use.
def - event definition (must be for an event); never nullintervalSelector - never nullcurrent - if true the current event set is returned,
else the previous complete set is returned
java.lang.IllegalArgumentException - if the request argument are invalid
EventVariableValue[] getEventValues(SimpleVariableDefinition def,
EventPeriod intervalSelector,
long intervalNumber,
java.util.BitSet whichValues)
Requests for more than SystemVariables.EVENT_SAMPLES_RETAINED in the past (or for the future!) cannot be satisfied and data will not be returned for them.
Usually not more than SystemVariables.EVENT_SAMPLES_RETAINED samples will be returned in response to any one request as a safety measure.
An implementation that is not an end-point may go upstream to fetch missing values and cache them to satisfy future requests. However, if unable to fetch authoritative data (quickly) then we will return null or non-authoritative data as appropriate for each slot; this does not throw IOException.
def - event definition (must be for an event); never nullintervalSelector - never nullintervalNumber - the number of the first interval
for which data is potentially required;
if too far in the past or future then possibly no data
will be available,
zero is used to select the "all" bucketwhichValues - each true bit represents a slot for which data is
required, bit 0 indicating data from the slot within which
firstIntervalTime is located, bit 1 the previous slot, etc;
null is treated as the common case equivalent to just bit 0 set
|
DHD Multimedia Gallery V1.53.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||