Package me.a8kj.config.file.operation
Interface ConfigOperationExecutor<K>
- Type Parameters:
K- the type of data keys used in the configuration file.
- All Known Implementing Classes:
BasicConfigOperationExecutor
public interface ConfigOperationExecutor<K>
An executor interface responsible for dispatching and managing the execution of
ConfigOperations.
It serves as the invoker in the command pattern, ensuring that operations are applied correctly
to the underlying configuration system.- Since:
- 0.1
- Author:
- a8kj7sea
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(ConfigOperation<K> operation) Executes a single configuration operation.default voidexecuteAll(ConfigOperation<K>... operations) Executes multiple configuration operations in the order they are provided.
-
Method Details
-
execute
Executes a single configuration operation.- Parameters:
operation- theConfigOperationto be executed.- Throws:
IOException- if an I/O error occurs during execution.- Since:
- 0.1
-
executeAll
Executes multiple configuration operations in the order they are provided. This is a convenience method for batching several actions (e.g., Create then Read).- Parameters:
operations- a varargs array ofConfigOperations to execute.- Throws:
IOException- if any of the operations encounter an I/O error.- Since:
- 0.1
-