本文整理了Java中org.jboss.as.clustering.controller.Operations.createReadAttributeOperation()
方法的一些代码示例,展示了Operations.createReadAttributeOperation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operations.createReadAttributeOperation()
方法的具体详情如下:
包路径:org.jboss.as.clustering.controller.Operations
类名称:Operations
方法名:createReadAttributeOperation
[英]Creates a read-attribute operation using the specified address and name.
[中]使用指定的地址和名称创建读取属性操作。
代码示例来源:origin: wildfly/wildfly
@Override
public ModelNode transformOperation(ModelNode operation) {
PathAddress address = Operations.getPathAddress(operation);
return Operations.createCompositeOperation(Operations.createReadAttributeOperation(cacheAddress(address), CacheResourceDefinition.DeprecatedAttribute.BATCHING), operation);
}
};
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getProtocolReadOperation(String stackName, String protocolName, Attribute attribute) {
return Operations.createReadAttributeOperation(getProtocolAddress(stackName, protocolName), attribute);
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getSubsystemReadOperation(Attribute attribute) {
return Operations.createReadAttributeOperation(getSubsystemAddress(), attribute);
}
代码示例来源:origin: wildfly/wildfly
protected static ModelNode getTransportReadOperation(String stackName, String type, Attribute attribute) {
return Operations.createReadAttributeOperation(getTransportAddress(stackName, type), attribute);
}
代码示例来源:origin: wildfly/wildfly
@SuppressWarnings("deprecation")
protected static ModelNode getTransportPropertyReadOperation(String stackName, String type, String propertyName) {
return Operations.createReadAttributeOperation(getTransportPropertyAddress(stackName, type, propertyName), new SimpleAttribute(PropertyResourceDefinition.VALUE));
}
代码示例来源:origin: wildfly/wildfly
@SuppressWarnings("deprecation")
protected static ModelNode getProtocolPropertyReadOperation(String stackName, String protocolName, String propertyName) {
return Operations.createReadAttributeOperation(getProtocolPropertyAddress(stackName, protocolName, propertyName), new SimpleAttribute(PropertyResourceDefinition.VALUE));
}
代码示例来源:origin: wildfly/wildfly
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
PathAddress currentAddress = context.getCurrentAddress();
PathAddress targetAddress = this.translation.getPathAddressTransformation().apply(currentAddress);
Attribute targetAttribute = this.translation.getTargetAttribute();
ModelNode targetOperation = Operations.createReadAttributeOperation(targetAddress, targetAttribute);
ImmutableManagementResourceRegistration targetRegistration = this.translation.getResourceRegistrationTransformation().apply(context.getResourceRegistration());
OperationStepHandler readAttributeHandler = targetRegistration.getAttributeAccess(PathAddress.EMPTY_ADDRESS, targetAttribute.getName()).getReadHandler();
OperationStepHandler readTranslatedAttributeHandler = new ReadTranslatedAttributeStepHandler(readAttributeHandler, targetAttribute, this.translation.getReadTranslator());
// If targetOperation applies to the current resource, we can execute in the current step
if (targetAddress == currentAddress) {
readTranslatedAttributeHandler.execute(context, targetOperation);
} else {
context.addStep(targetOperation, readTranslatedAttributeHandler, context.getCurrentStage(), true);
}
}
代码示例来源:origin: org.wildfly/wildfly-clustering-infinispan-extension
@Override
public ModelNode transformOperation(ModelNode operation) {
PathAddress address = Operations.getPathAddress(operation);
return Operations.createCompositeOperation(Operations.createReadAttributeOperation(cacheAddress(address), CacheResourceDefinition.DeprecatedAttribute.BATCHING), operation);
}
};
代码示例来源:origin: org.jboss.eap/wildfly-clustering-common
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
PathAddress currentAddress = context.getCurrentAddress();
PathAddress targetAddress = this.translation.getPathAddressTransformation().apply(currentAddress);
Attribute targetAttribute = this.translation.getTargetAttribute();
ModelNode targetOperation = Operations.createReadAttributeOperation(targetAddress, targetAttribute);
ImmutableManagementResourceRegistration targetRegistration = this.translation.getResourceRegistrationTransformation().apply(context.getResourceRegistration());
OperationStepHandler readAttributeHandler = targetRegistration.getAttributeAccess(PathAddress.EMPTY_ADDRESS, targetAttribute.getName()).getReadHandler();
OperationStepHandler readTranslatedAttributeHandler = new ReadTranslatedAttributeStepHandler(readAttributeHandler, targetAttribute, this.translation.getReadTranslator());
// If targetOperation applies to the current resource, we can execute in the current step
if (targetAddress == currentAddress) {
readTranslatedAttributeHandler.execute(context, targetOperation);
} else {
context.addStep(targetOperation, readTranslatedAttributeHandler, context.getCurrentStage(), true);
}
}
内容来源于网络,如有侵权,请联系作者删除!