java.lang.Object
A transaction body for all five freeze transactions.
Combining five different transactions into a single message, this
transaction body MUST support options to schedule a freeze, abort a
scheduled freeze, prepare a software upgrade, prepare a telemetry
upgrade, or initiate a software upgrade.
For a scheduled freeze, at the scheduled time, according to
network consensus time
- A freeze (`FREEZE_ONLY`) causes the network nodes to stop creating
events or accepting transactions, and enter a persistent
maintenance state.
- A freeze upgrade (`FREEZE_UPGRADE`) causes the network nodes to stop
creating events or accepting transactions, and upgrade the node software
from a previously prepared upgrade package. The network nodes then
restart and rejoin the network after upgrading.
For other freeze types, immediately upon processing the freeze transaction
- A Freeze Abort (`FREEZE_ABORT`) cancels any pending scheduled freeze.
- A prepare upgrade (`PREPARE_UPGRADE`) begins to extract the contents of
the specified upgrade file to the local filesystem.
- A telemetry upgrade (`TELEMETRY_UPGRADE`) causes the network nodes to
extract a telemetry upgrade package to the local filesystem and signal
other software on the machine to upgrade, without impacting the node or
network processing.
### Block Stream Effects
Unknown
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Transaction
Transaction.SignableNodeTransactionBodyBytesNested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Executable
Executable.GrpcRequest -
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.Transaction
customFeeLimits, DEFAULT_AUTO_RENEW_PERIOD, defaultMaxTransactionFee, DUMMY_ACCOUNT_ID, DUMMY_TRANSACTION_ID, frozenBodyBuilder, innerSignedTransactions, outerTransactions, publicKeys, regenerateTransactionId, signers, sigPairLists, sourceTransactionBody, transactionIdsFields inherited from class com.hedera.hashgraph.sdk.Executable
attemptedAllNodes, blockingUnaryCall, grpcDeadline, logger, maxAttempts, maxBackoff, minBackoff, nodeAccountIds, nodes, random, RST_STREAM -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.FreezeTransaction(TransactionBody txBody) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) FreezeTransactionBody.Builderbuild()Build the correct transaction body.Deprecated.with no replacementbyte[]The expected hash of the contents of the update file (used to verify the update)Extract the file id.Extract the freeze type.(package private) io.grpc.MethodDescriptor<Transaction, TransactionResponse> Called to direct the invocation of the query to the appropriate gRPC service.Extract the start time.byte[]Deprecated.UsegetFileHash()instead.Deprecated.UsegetFileId()instead.(package private) voidInitialize from the transaction body.(package private) voidonFreeze(TransactionBody.Builder bodyBuilder) Called inTransaction.freezeWith(Client)just before the transaction body is built.(package private) voidonScheduled(SchedulableTransactionBody.Builder scheduled) Called inTransaction.schedule()when converting transaction into a scheduled version.setEndTime(int hour, int minute) Deprecated.with no replacementsetFileHash(byte[] fileHash) A SHA384 hash of file content.
This is a hash of the file identified by `update_file`.Assign the file id.setFreezeType(FreezeType freezeType) The type of freeze.setStartTime(int hour, int minute) Deprecated.UsesetStartTime(Instant)instead.setStartTime(Instant startTime) A start time for the freeze.setUpdateFileHash(byte[] updateFileHash) Deprecated.UsesetFileHash(byte[])instead.setUpdateFileId(FileId updateFileId) Deprecated.UsesetFileId(FileId)instead.(package private) voidvalidateChecksums(Client client) Methods inherited from class com.hedera.hashgraph.sdk.Transaction
addSignature, addSignature, batchify, buildAllTransactions, buildTransaction, doSchedule, estimateFee, freeze, freezeWith, fromBytes, fromScheduledTransaction, generateTransactionIds, getBatchKey, getDefaultMaxTransactionFee, getExecutionState, getHighVolume, getMaxTransactionFee, getRegenerateTransactionId, getRequiredChunks, getSignableNodeBodyBytesList, getSignatures, getSignaturesAtOffset, getTransactionBodySize, getTransactionHash, getTransactionHashPerNode, getTransactionId, getTransactionIdInternal, getTransactionMemo, getTransactionSize, getTransactionValidDuration, hash, isBatchedAndNotBatchTransaction, isFrozen, keyAlreadySigned, makeRequest, mapResponse, mapResponseStatus, onExecute, onExecuteAsync, regenerateTransactionId, requireNotFrozen, requireOneNodeAccountId, schedule, setBatchKey, setHighVolume, setMaxTransactionFee, setNodeAccountIds, setRegenerateTransactionId, setTransactionId, setTransactionMemo, setTransactionValidDuration, sign, signTransaction, signWith, signWithOperator, spawnBodyBuilder, toBytes, toString, wipeTransactionListsMethods inherited from class com.hedera.hashgraph.sdk.Executable
advanceRequest, checkNodeAccountIds, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getGrpcRequest, getMaxAttempts, getMaxBackoff, getMaxRetry, getMinBackoff, getNodeAccountIds, getNodeForExecute, grpcDeadline, logTransaction, mergeFromClient, setGrpcDeadline, setLogger, setMaxAttempts, setMaxBackoff, setMaxRetry, setMinBackoff, setNodesFromNodeAccountIds, setRequestListener, setResponseListener, shouldRetryExceptionally
-
Constructor Details
-
FreezeTransaction
public FreezeTransaction()Constructor. -
FreezeTransaction
FreezeTransaction(LinkedHashMap<TransactionId, LinkedHashMap<AccountId, throws com.google.protobuf.InvalidProtocolBufferExceptionTransaction>> txs) Constructor.- Parameters:
txs- Compound list of transaction id's list of (AccountId, Transaction) records- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
FreezeTransaction
FreezeTransaction(TransactionBody txBody) Constructor.- Parameters:
txBody- protobuf TransactionBody
-
-
Method Details
-
getStartTime
Extract the start time.- Returns:
- the start time
-
setStartTime
A start time for the freeze.If this field is REQUIRED for the specified `freeze_type`, then when the network consensus time reaches this instant
- The network SHALL stop accepting transactions.
- The network SHALL gossip a freeze state.
- The nodes SHALL, in coordinated order, disconnect and shut down.
- The nodes SHALL halt or perform a software upgrade, depending on `freeze_type`.
- If the `freeze_type` is `FREEZE_UPGRADE`, the nodes SHALL restart and rejoin the network upon completion of the software upgrade.
If the `freeze_type` is `TELEMETRY_UPGRADE`, the start time is required, but the network SHALL NOT stop, halt, or interrupt transaction processing. The required field is an historical anomaly and SHOULD change in a future release.
- Parameters:
startTime- the start time- Returns:
this
-
setStartTime
Deprecated.UsesetStartTime(Instant)instead.- Parameters:
hour- The hour to be setminute- The minute to be set- Returns:
this
-
getEndTime
Deprecated.with no replacement- Returns:
- the end time
-
setEndTime
Deprecated.with no replacementSets the end time (in UTC).- Parameters:
hour- The hour to be setminute- The minute to be set- Returns:
this
-
getUpdateFileId
Deprecated.UsegetFileId()instead.- Returns:
- the fileId
-
setUpdateFileId
Deprecated.UsesetFileId(FileId)instead.- Parameters:
updateFileId- the new fileId- Returns:
this
-
getUpdateFileHash
Deprecated.UsegetFileHash()instead.- Returns:
- the fileHash
-
setUpdateFileHash
Deprecated.UsesetFileHash(byte[])instead.- Parameters:
updateFileHash- fileHash to set- Returns:
this
-
getFileId
Extract the file id.- Returns:
- the file id
-
setFileId
Assign the file id.- Parameters:
fileId- the file id- Returns:
this
-
getFileHash
public byte[] getFileHash()The expected hash of the contents of the update file (used to verify the update)- Returns:
- the file's hash
-
setFileHash
A SHA384 hash of file content.
This is a hash of the file identified by `update_file`.This MUST be set if `update_file` is set, and MUST match the SHA384 hash of the contents of that file.
- Parameters:
fileHash- the fileHash to set- Returns:
this
-
getFreezeType
Extract the freeze type.- Returns:
- the freeze type
-
setFreezeType
The type of freeze.This REQUIRED field effectively selects between five quite different transactions in the same transaction body. Depending on this value the service may schedule a freeze, prepare upgrades, perform upgrades, or even abort a previously scheduled freeze.
FreezeTransaction- Parameters:
freezeType- the freeze type- Returns:
this
-
validateChecksums
- Specified by:
validateChecksumsin classTransaction<FreezeTransaction>
-
getMethodDescriptor
io.grpc.MethodDescriptor<Transaction,TransactionResponse> getMethodDescriptor()Description copied from class:ExecutableCalled to direct the invocation of the query to the appropriate gRPC service.- Specified by:
getMethodDescriptorin classExecutable<FreezeTransaction,Transaction, TransactionResponse, TransactionResponse>
-
initFromTransactionBody
void initFromTransactionBody()Initialize from the transaction body. -
build
FreezeTransactionBody.Builder build()Build the correct transaction body.- Returns:
builder
-
onFreeze
Description copied from class:TransactionCalled inTransaction.freezeWith(Client)just before the transaction body is built. The intent is for the derived class to assign their data variant to the transaction body.- Specified by:
onFreezein classTransaction<FreezeTransaction>
-
onScheduled
Description copied from class:TransactionCalled inTransaction.schedule()when converting transaction into a scheduled version.- Specified by:
onScheduledin classTransaction<FreezeTransaction>
-