java.lang.Object
com.hedera.hashgraph.sdk.Executable<NodeDeleteTransaction,Transaction,TransactionResponse,TransactionResponse>
com.hedera.hashgraph.sdk.Transaction<NodeDeleteTransaction>
com.hedera.hashgraph.sdk.NodeDeleteTransaction
A transaction to delete a node from the network address book.
This transaction body SHALL be considered a "privileged transaction".
- A transaction MUST be signed by the governing council.
- Upon success, the address book entry SHALL enter a "pending delete"
state.
- All address book entries pending deletion SHALL be removed from the
active network configuration during the next `freeze` transaction with
the field `freeze_type` set to `PREPARE_UPGRADE`.
- A deleted address book node SHALL be removed entirely from network state. - A deleted address book node identifier SHALL NOT be reused. ### Record Stream Effects Upon completion the "deleted" `node_id` SHALL be in the transaction receipt.
- A deleted address book node SHALL be removed entirely from network state. - A deleted address book node identifier SHALL NOT be reused. ### Record Stream Effects Upon completion the "deleted" `node_id` SHALL be in the transaction receipt.
-
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.NodeDeleteTransaction(TransactionBody txBody) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) NodeDeleteTransactionBody.Builderbuild()Build the transaction body.freezeWith(Client client) Freeze this transaction with the given client.(package private) io.grpc.MethodDescriptor<Transaction, TransactionResponse> Called to direct the invocation of the query to the appropriate gRPC service.longExtract the consensus node identifier in the network state.(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.setNodeId(long nodeId) A consensus node identifier in the network state.(package private) voidvalidateChecksums(Client client) Methods inherited from class com.hedera.hashgraph.sdk.Transaction
addSignature, addSignature, batchify, buildAllTransactions, buildTransaction, doSchedule, estimateFee, freeze, 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
-
NodeDeleteTransaction
public NodeDeleteTransaction()Constructor. -
NodeDeleteTransaction
NodeDeleteTransaction(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
-
NodeDeleteTransaction
NodeDeleteTransaction(TransactionBody txBody) Constructor.- Parameters:
txBody- protobuf TransactionBody
-
-
Method Details
-
getNodeId
public long getNodeId()Extract the consensus node identifier in the network state.- Returns:
- the consensus node identifier in the network state.
- Throws:
IllegalStateException- when node is not being set
-
setNodeId
A consensus node identifier in the network state.The node identified MUST exist in the network address book.
The node identified MUST NOT be deleted.
This value is REQUIRED.- Parameters:
nodeId- the consensus node identifier in the network state.- Returns:
this- Throws:
IllegalArgumentException- if nodeId is negative
-
build
Build the transaction body.- Returns:
NodeDeleteTransactionBody
-
initFromTransactionBody
void initFromTransactionBody()Initialize from the transaction body. -
validateChecksums
- Specified by:
validateChecksumsin classTransaction<NodeDeleteTransaction>- Throws:
BadEntityIdException
-
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<NodeDeleteTransaction,Transaction, TransactionResponse, TransactionResponse>
-
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<NodeDeleteTransaction>
-
onScheduled
Description copied from class:TransactionCalled inTransaction.schedule()when converting transaction into a scheduled version.- Specified by:
onScheduledin classTransaction<NodeDeleteTransaction>
-
freezeWith
Freeze this transaction with the given client.- Overrides:
freezeWithin classTransaction<NodeDeleteTransaction>- Parameters:
client- the client to freeze with- Returns:
- this transaction
- Throws:
IllegalStateException- if nodeId is not set
-