public interface Batch
Modifier and Type | Method and Description |
---|---|
void |
add(BatchedCommand cmd)
Adds a command or an operation to the batch.
|
void |
clear()
Removes all the commands and the operations from the batch.
|
List<BatchedCommand> |
getCommands()
Returns all the commands and operations in the batch as a list.
|
void |
move(int currentIndex,
int newIndex)
Move the command or operation corresponding to the currentIndex to the newIndex position,
shifting the commands/operations in between the indexes.
|
void |
remove(int index)
Removes command or operation corresponding to its index in the list.
|
void |
set(int index,
BatchedCommand cmd)
Replaces the command or operation at the specified index with the new one.
|
int |
size()
Returns the number of the commands and operations in the batch.
|
org.jboss.dmr.ModelNode |
toRequest()
Generates a composite operation request from all the commands and operations
in the batch.
|
void add(BatchedCommand cmd)
cmd
- command or operation to add to the batchList<BatchedCommand> getCommands()
void clear()
void remove(int index)
index
- the index of the command or operation to be removed from the batchvoid move(int currentIndex, int newIndex)
currentIndex
- the index of the command or operation to move the new positionnewIndex
- the new position for the command/operationvoid set(int index, BatchedCommand cmd)
index
- the position for the new command or operation.cmd
- the new command or operationint size()
org.jboss.dmr.ModelNode toRequest()
Copyright © 2023 JBoss by Red Hat. All rights reserved.