use of org.infinispan.client.hotrod.jmx.RemoteCacheManagerMXBean in project wildfly by wildfly.
the class RemoteClusterOperationExecutor method execute.
@Override
public ModelNode execute(OperationContext context, ModelNode op, Operation<Map.Entry<String, RemoteCacheManagerMXBean>> operation) throws OperationFailedException {
ServiceName name = InfinispanClientRequirement.REMOTE_CONTAINER.getServiceName(context, UnaryCapabilityNameResolver.PARENT);
FunctionExecutor<RemoteCacheContainer> executor = this.executors.get(name);
Function<RemoteCacheContainer, Map.Entry<String, RemoteCacheManagerMXBean>> mapper = new Function<RemoteCacheContainer, Map.Entry<String, RemoteCacheManagerMXBean>>() {
@Override
public Map.Entry<String, RemoteCacheManagerMXBean> apply(RemoteCacheContainer container) {
String cluster = context.getCurrentAddressValue();
return new AbstractMap.SimpleImmutableEntry<>(cluster, container);
}
};
return (executor != null) ? executor.execute(new OperationFunction<>(context, op, mapper, operation)) : null;
}
Aggregations