Package org.jboss.as.threads
Class ThreadsWriteAttributeOperationHandler
- java.lang.Object
-
- org.jboss.as.controller.AbstractWriteAttributeHandler<Boolean>
-
- org.jboss.as.threads.ThreadsWriteAttributeOperationHandler
-
- All Implemented Interfaces:
OperationStepHandler
- Direct Known Subclasses:
BoundedQueueThreadPoolWriteAttributeHandler
,QueuelessThreadPoolWriteAttributeHandler
,ScheduledThreadPoolWriteAttributeHandler
,ThreadFactoryWriteAttributeHandler
,UnboundedQueueThreadPoolWriteAttributeHandler
public abstract class ThreadsWriteAttributeOperationHandler extends AbstractWriteAttributeHandler<Boolean>
Abstract superclass for write-attribute operation handlers for the threads subsystem.- Author:
- Brian Stansberry, Alexey Loubyansky
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
AbstractWriteAttributeHandler.HandbackHolder<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeDefinition[]
attributes
protected Map<String,AttributeDefinition>
runtimeAttributes
-
Constructor Summary
Constructors Constructor Description ThreadsWriteAttributeOperationHandler(AttributeDefinition[] attributes, AttributeDefinition[] runtimeAttributes)
Creates a handler that doesn't validate values.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
applyOperation(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.msc.service.ServiceController<?> service, boolean forRollback)
protected boolean
applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Boolean> handbackHolder)
protected abstract org.jboss.msc.service.ServiceController<?>
getService(OperationContext context, org.jboss.dmr.ModelNode model)
void
registerAttributes(ManagementResourceRegistration registry)
protected void
revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert, Boolean handback)
-
Methods inherited from class org.jboss.as.controller.AbstractWriteAttributeHandler
execute, finishModelStage, getAttributeDefinition, recordCapabilitiesAndRequirements, requiresRuntime, validateUpdatedModel
-
-
-
-
Field Detail
-
attributes
protected final AttributeDefinition[] attributes
-
runtimeAttributes
protected final Map<String,AttributeDefinition> runtimeAttributes
-
-
Constructor Detail
-
ThreadsWriteAttributeOperationHandler
public ThreadsWriteAttributeOperationHandler(AttributeDefinition[] attributes, AttributeDefinition[] runtimeAttributes)
Creates a handler that doesn't validate values.- Parameters:
attributes
- all persistent attributes of theruntimeAttributes
- attributes whose updated value can immediately be applied to the runtime
-
-
Method Detail
-
applyUpdateToRuntime
protected boolean applyUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode newValue, org.jboss.dmr.ModelNode currentValue, AbstractWriteAttributeHandler.HandbackHolder<Boolean> handbackHolder) throws OperationFailedException
- Specified by:
applyUpdateToRuntime
in classAbstractWriteAttributeHandler<Boolean>
- Throws:
OperationFailedException
-
revertUpdateToRuntime
protected void revertUpdateToRuntime(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.dmr.ModelNode valueToRestore, org.jboss.dmr.ModelNode valueToRevert, Boolean handback) throws OperationFailedException
- Specified by:
revertUpdateToRuntime
in classAbstractWriteAttributeHandler<Boolean>
- Throws:
OperationFailedException
-
registerAttributes
public void registerAttributes(ManagementResourceRegistration registry)
-
getService
protected abstract org.jboss.msc.service.ServiceController<?> getService(OperationContext context, org.jboss.dmr.ModelNode model) throws OperationFailedException
- Throws:
OperationFailedException
-
applyOperation
protected abstract void applyOperation(OperationContext context, org.jboss.dmr.ModelNode operation, String attributeName, org.jboss.msc.service.ServiceController<?> service, boolean forRollback) throws OperationFailedException
- Throws:
OperationFailedException
-
-