use of org.infinispan.xsite.XSiteAdminOperations in project wildfly by wildfly.
the class BackupOperationExecutor method execute.
@Override
public ModelNode execute(OperationContext context, ModelNode operation, Operation<Map.Entry<String, XSiteAdminOperations>> executable) throws OperationFailedException {
ServiceName name = InfinispanCacheRequirement.CACHE.getServiceName(context, BinaryCapabilityNameResolver.GRANDPARENT_PARENT);
Function<Cache<?, ?>, Map.Entry<String, XSiteAdminOperations>> mapper = new Function<Cache<?, ?>, Map.Entry<String, XSiteAdminOperations>>() {
@Override
public Map.Entry<String, XSiteAdminOperations> apply(Cache<?, ?> cache) {
String site = context.getCurrentAddressValue();
return new AbstractMap.SimpleImmutableEntry<>(site, cache.getAdvancedCache().getComponentRegistry().getLocalComponent(XSiteAdminOperations.class));
}
};
FunctionExecutor<Cache<?, ?>> executor = this.executors.get(name);
return (executor != null) ? executor.execute(new OperationFunction<>(context, operation, mapper, executable)) : null;
}
Aggregations