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 ProofEntryIndex<java.time.ZonedDateTime>
getTime()
Returns consolidated time output by the service in UTC.ProofMapIndexProxy<PublicKey,java.time.ZonedDateTime>
getValidatorsTimes()
Returns the table that stores time for every validator.static TimeSchema
newInstance(BlockchainData blockchainData, java.lang.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:
blockchainData
- the blockchain data; may come from any servicename
- the name of the time oracle service instance to use- Throws:
java.lang.IllegalArgumentException
- if there is no service with the given name or it is not an Exonum time oracle
-
getTime
ProofEntryIndex<java.time.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,java.time.ZonedDateTime> getValidatorsTimes()Returns the table that stores time for every validator. Note that this is a proof map that uses non-hashed keys.
-