Package com.exonum.binding.time
Interface TimeSchema
public interface TimeSchema
Exonum time service database schema. It provides read-only access to the state
of a time oracle service instance.
- See Also:
- Time oracle documentation
-
Method Summary
Modifier and Type Method Description EntryIndexProxy<ZonedDateTime>
getTime()
Returns consolidated time output by the service in UTC.ProofMapIndexProxy<PublicKey,ZonedDateTime>
getValidatorsTimes()
Returns the table that stores time for every validator.static TimeSchema
newInstance(View dbView, String name)
Constructs a schema of the time oracle instance with the given name.
-
Method Details
-
newInstance
Constructs a schema of the time oracle instance with the given name.- Parameters:
dbView
- the database viewname
- the name of the time oracle service instance to use- Throws:
IllegalArgumentException
- if there is no service with the given name or it is not an Exonum time oracle
-
getTime
EntryIndexProxy<ZonedDateTime> getTime()Returns consolidated time output by the service in UTC.When this time oracle instance is started, the consolidated time remains unknown until the transactions with time updates from at least two thirds of validator nodes are processed. After that the time will be always present.
-
getValidatorsTimes
ProofMapIndexProxy<PublicKey,ZonedDateTime> getValidatorsTimes()Returns the table that stores time for every validator. Note that this is a proof map that uses non-hashed keys.
-