| Modifier | Constructor and Description |
|---|---|
protected |
AbstractService(ServiceInstanceSpec instanceSpec) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Schema |
createDataSchema(View view)
Creates a data schema of this service.
|
protected int |
getId()
Returns the numeric id of the service instance.
|
protected ServiceInstanceSpec |
getInstanceSpec()
Returns this service instance specification.
|
protected String |
getName()
Returns the name of the service instance.
|
List<com.exonum.binding.common.hash.HashCode> |
getStateHashes(Snapshot snapshot)
Returns a list of hashes representing the state of this service, as of the given snapshot
of the blockchain state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterCommit, beforeCommit, createPublicApiHandlers, initializeprotected AbstractService(ServiceInstanceSpec instanceSpec)
protected final String getName()
ServiceInstanceSpec.getName()protected final int getId()
ServiceInstanceSpec.getId()protected final ServiceInstanceSpec getInstanceSpec()
public List<com.exonum.binding.common.hash.HashCode> getStateHashes(Snapshot snapshot)
ServiceThe core uses this list to verify that the service on each node in the network has the same database state. To do so efficiently, it aggregates state hashes of all services into a single Merkelized meta-map. The hash of this meta-map is considered the hash of the entire blockchain state and is recorded as such in blocks and Precommit messages.
Please note that if this service does not provide any state hashes, the framework will not be able to verify that its transactions cause the same results on different nodes.
getStateHashes in interface Servicesnapshot - a snapshot of the blockchain state. Not valid after this method returnsProofListIndexProxy.getIndexHash(),
ProofMapIndexProxy.getIndexHash()Copyright © 2019 Exonum. All rights reserved.