Version
open class Version : Disposable, AutoCloseable, VersionInterface
Functions
| Name | Summary |
|---|---|
| asU64 | open override fun asU64(): ULong Get the underlying u64 value of this version |
| close | @Synchronized open override fun close() |
| destroy | open override fun destroy() |
| getCongestedVersionSuggestedGasPrice | open override fun getCongestedVersionSuggestedGasPrice(): ULong Returns the suggested_gas_price embedded in this congested shared object version. The suggested_gas_price here is used for a gas price feedback mechanism for transactions canceled due to shared object congestion. |
| isCanceled | open override fun isCanceled(): Boolean Checks if this version is canceled, i.e., the corresponding object appears in a canceled transaction. |
| isCongested | open override fun isCongested(): Boolean Check if this version is congested, i.e., the corresponding object is the reason for transaction cancellation. |
| isValid | open override fun isValid(): Boolean Checks if this version is valid, i.e., the corresponding object does not appear in a canceled transaction. |
| next | open override fun next(): Version Returns the next version, or an error if overflow occurs. |
| previous | open override fun previous(): Version Returns the previous version, or an error if underflow occurs. |
Companion object functions
| Name | Summary |
|---|---|
| canceledRead | fun canceledRead(): Version Special version that is assigned to objects which are accessed immutably in a canceled transaction. |
| congestedPriorToGasPriceFeedback | fun congestedPriorToGasPriceFeedback(): Version Special version that was assigned to congested objects which cause transaction cancellations. Note that this special version was only used prior to the introduction of a gas price feedback mechanism, but it is kept for backward compatibility. |
| fromU64 | fun fromU64(value: ULong): Version Create a new Version from a u64 value |
| lamportIncrement | fun lamportIncrement(inputs: List<Version>): Version Returns a new version that is greater than all versions in inputs, assuming this operation will not overflow. |
| maxValidExcl | fun maxValidExcl(): Version An exclusive upper limit on a valid version: versions strictly smaller than this limit are valid versions. |
| minValidIncl | fun minValidIncl(): Version An inclusive lower limit on a valid version. |
| newCongestedWithSuggestedGasPrice | fun newCongestedWithSuggestedGasPrice(suggestedGasPrice: ULong): Version Returns a special version used for congested shared objects: Version::MIN_CONGESTED + suggested_gas_price, where suggested_gas_price is embedded into a congested version to facilitate a gas price feedback mechanism for transactions canceled due to shared object congestion. |
| randomnessUnavailable | fun randomnessUnavailable(): Version |