org.infinispan.cli.completers.CacheConfigurationCompleter Maven / Gradle / Ivy
package org.infinispan.cli.completers;
import java.util.Collection;
import org.infinispan.cli.Context;
import org.infinispan.cli.connection.Connection;
import org.infinispan.cli.resources.ContainerResource;
/**
* @author Tristan Tarrant <[email protected]>
* @since 10.0
**/
public class CacheConfigurationCompleter extends ListCompleter {
@Override
Collection getAvailableItems(Context context) {
Connection connection = context.getConnection();
return connection.getAvailableCacheConfigurations(connection.getActiveResource().findAncestor(ContainerResource.class).getName());
}
}