Package org.infinispan.cli.resources
Class CacheResource
- java.lang.Object
-
- org.infinispan.cli.resources.AbstractResource
-
- org.infinispan.cli.resources.CacheResource
-
- All Implemented Interfaces:
Resource
public class CacheResource extends AbstractResource
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.cli.resources.Resource
Resource.ListFormat
-
-
Constructor Summary
Constructors Constructor Description CacheResource(CachesResource parent, String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcacheName(Resource resource)Stringdescribe()Returns a textual representation of this resourcestatic Optional<String>findCacheName(Resource resource)ResourcegetChild(String name)Returns a resource representing the named childIterable<String>getChildrenNames(int limit)booleanisLeaf()Returns whether this resource is a leaf resource (i.e.voidprintChildren(Resource.ListFormat format, int limit, PrettyPrinter.PrettyPrintMode prettyPrintMode, org.aesh.command.shell.Shell shell)-
Methods inherited from class org.infinispan.cli.resources.AbstractResource
findAncestor, getChild, getChildrenNames, getName, getParent, getResource, optionalFindAncestor
-
-
-
-
Constructor Detail
-
CacheResource
public CacheResource(CachesResource parent, String name)
-
-
Method Detail
-
getChildrenNames
public Iterable<String> getChildrenNames(int limit) throws IOException
- Throws:
IOException
-
printChildren
public void printChildren(Resource.ListFormat format, int limit, PrettyPrinter.PrettyPrintMode prettyPrintMode, org.aesh.command.shell.Shell shell) throws IOException
- Specified by:
printChildrenin interfaceResource- Overrides:
printChildrenin classAbstractResource- Throws:
IOException
-
isLeaf
public boolean isLeaf()
Description copied from interface:ResourceReturns whether this resource is a leaf resource (i.e. it has no children, or the children are not navigable)- Specified by:
isLeafin interfaceResource- Overrides:
isLeafin classAbstractResource
-
getChild
public Resource getChild(String name)
Description copied from interface:ResourceReturns a resource representing the named child- Specified by:
getChildin interfaceResource- Overrides:
getChildin classAbstractResource
-
describe
public String describe() throws IOException
Description copied from interface:ResourceReturns a textual representation of this resource- Specified by:
describein interfaceResource- Overrides:
describein classAbstractResource- Throws:
IOException
-
-