Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pool, plugin: Add admin commands for plugins
Motivation: Sometimes it's helpful to be able to print some statistics or interact with a plugin instance, for example nearline storage, after it is created. Modification: Add possibility to dynamically add and remove prefixed commands if a plugin implements CellDynamicCommandProvider. Result: If a plugin implements CellDynamicCommandProvider, dCache scans for Command-Annotations and adds them to the pool with the instance name as a prefix. If the hsm instance is removed, the commands will be removed, too. target: master Requires-book: yes Requires-note: yes Acked-by: Paul Millar GitHub: #6249 Patch: https://rb.dcache.org/r/13445/
- Loading branch information
Showing
5 changed files
with
116 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
modules/cells/src/main/java/dmg/cells/nucleus/CellDynamicCommandProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package dmg.cells.nucleus; | ||
|
||
import dmg.util.CommandInterpreter; | ||
|
||
/** | ||
* An implementation of this interface can dynamically provide new admin commands (typically by | ||
* loading external classes). | ||
*/ | ||
|
||
public interface CellDynamicCommandProvider { | ||
/** | ||
* Inject command interpreter into which commands can be dynamically added. | ||
* @param commandInterpreter command interpreter to use. | ||
*/ | ||
|
||
void setCommandInterpreter(CommandInterpreter commandInterpreter); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters