public class EJB3SubsystemDefaultCacheWriteHandler extends AbstractWriteAttributeHandler<Void>
AbstractWriteAttributeHandler.HandbackHolder<T>
Modifier and Type | Field and Description |
---|---|
static EJB3SubsystemDefaultCacheWriteHandler |
CLUSTERED_SFSB_CACHE |
static EJB3SubsystemDefaultCacheWriteHandler |
SFSB_CACHE |
Constructor and Description |
---|
EJB3SubsystemDefaultCacheWriteHandler(org.jboss.msc.service.ServiceName serviceName,
org.jboss.msc.service.ServiceName defaultServiceName,
AttributeDefinition attribute) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
applyUpdateToRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.dmr.ModelNode resolvedValue,
org.jboss.dmr.ModelNode currentValue,
AbstractWriteAttributeHandler.HandbackHolder<Void> handbackHolder)
Hook to allow subclasses to make runtime changes to effect the attribute value change.
|
protected void |
revertUpdateToRuntime(OperationContext context,
org.jboss.dmr.ModelNode operation,
String attributeName,
org.jboss.dmr.ModelNode valueToRestore,
org.jboss.dmr.ModelNode valueToRevert,
Void handback)
Hook to allow subclasses to revert runtime changes made in
AbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder) . |
protected void |
validateResolvedValue(String attributeName,
org.jboss.dmr.ModelNode value)
If a resolved value validator was passed to the constructor, uses it to validate the value.
|
execute, getAttributeDefinition, requiresRuntime, validateUnresolvedValue
public static final EJB3SubsystemDefaultCacheWriteHandler SFSB_CACHE
public static final EJB3SubsystemDefaultCacheWriteHandler CLUSTERED_SFSB_CACHE
public EJB3SubsystemDefaultCacheWriteHandler(org.jboss.msc.service.ServiceName serviceName, org.jboss.msc.service.ServiceName defaultServiceName, AttributeDefinition attribute)
protected void validateResolvedValue(String attributeName, org.jboss.dmr.ModelNode value) throws OperationFailedException
AbstractWriteAttributeHandler
validateResolvedValue
in class AbstractWriteAttributeHandler<Void>
attributeName
- the name of the attribute being updatedvalue
- the resolved valueOperationFailedException
protected boolean applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode resolvedValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Void> handbackHolder) throws OperationFailedException
AbstractWriteAttributeHandler
applyUpdateToRuntime
in class AbstractWriteAttributeHandler<Void>
context
- the context of the operationoperation
- the operationattributeName
- the name of the attribute being modifiedresolvedValue
- the new value for the attribute, after ModelNode.resolve()
has been called on itcurrentValue
- the existing value for the attributehandbackHolder
- holder for an arbitrary object to pass to
AbstractWriteAttributeHandler.revertUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, Object)
if
the operation needs to be rolled backtrue
if the server requires restart to effect the attribute
value change; false
if notOperationFailedException
protected void revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert, Void handback) throws OperationFailedException
AbstractWriteAttributeHandler
AbstractWriteAttributeHandler.applyUpdateToRuntime(OperationContext, ModelNode, String, ModelNode, ModelNode, HandbackHolder)
.revertUpdateToRuntime
in class AbstractWriteAttributeHandler<Void>
context
- the context of the operationoperation
- the operationattributeName
- the name of the attribute being modifiedvalueToRestore
- the previous value for the attribute, before this operation was executedvalueToRevert
- the new value for the attribute that should be revertedhandback
- an object, if any, passed in to the handbackHolder
by the applyUpdateToRuntime
implementationOperationFailedException
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.