Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFCORE-6924 Remove usage of deprecated AbstractWriteAttributeHandler constructors in IO subsystem #6103

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,39 +116,39 @@ public Collection<AttributeDefinition> getAttributes() {
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
resourceRegistration.registerReadWriteAttribute(WORKER_TASK_MAX_THREADS,
new WorkerReadAttributeHandler(WORKER_TASK_MAX_THREADS.getOption()),
new WorkerWriteAttributeHandler(WORKER_TASK_MAX_THREADS){
new WorkerWriteAttributeHandler(){
@Override
boolean setValue(XnioWorker worker, ModelNode value) throws IOException {
return worker.setOption(Options.WORKER_TASK_MAX_THREADS, value.asInt()) == null;
}
});
resourceRegistration.registerReadWriteAttribute(WORKER_TASK_CORE_THREADS,
new WorkerReadAttributeHandler(WORKER_TASK_CORE_THREADS.getOption()),
new WorkerWriteAttributeHandler(WORKER_TASK_CORE_THREADS) {
new WorkerWriteAttributeHandler() {
@Override
boolean setValue(XnioWorker worker, ModelNode value) throws IOException {
return worker.setOption(Options.WORKER_TASK_CORE_THREADS, value.asInt()) == null;
}
});
resourceRegistration.registerReadWriteAttribute(WORKER_TASK_KEEPALIVE,
new WorkerReadAttributeHandler(WORKER_TASK_KEEPALIVE.getOption()),
new WorkerWriteAttributeHandler(WORKER_TASK_KEEPALIVE){
new WorkerWriteAttributeHandler(){
@Override
boolean setValue(XnioWorker worker, ModelNode value) throws IOException {
return worker.setOption(Options.WORKER_TASK_KEEPALIVE, value.asInt()) == null;
}
});
resourceRegistration.registerReadWriteAttribute(STACK_SIZE,
new WorkerReadAttributeHandler(STACK_SIZE.getOption()),
new WorkerWriteAttributeHandler(STACK_SIZE){
new WorkerWriteAttributeHandler(){
@Override
boolean setValue(XnioWorker worker, ModelNode value) throws IOException {
return worker.setOption(Options.STACK_SIZE, value.asLong()) == null;
}
});
resourceRegistration.registerReadWriteAttribute(WORKER_IO_THREADS,
new WorkerReadAttributeHandler(WORKER_IO_THREADS.getOption()),
new WorkerWriteAttributeHandler(WORKER_IO_THREADS){
new WorkerWriteAttributeHandler(){
@Override
boolean setValue(XnioWorker worker, ModelNode value) throws IOException {
return worker.setOption(Options.WORKER_IO_THREADS, value.asInt()) == null;
Expand Down Expand Up @@ -202,10 +202,6 @@ public void execute(OperationContext outContext, ModelNode operation) throws Ope

private abstract static class WorkerWriteAttributeHandler extends AbstractWriteAttributeHandler {

WorkerWriteAttributeHandler(final AttributeDefinition... definitions){
super(definitions);
}

@Override
protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode value, ModelNode currentValue, HandbackHolder handbackHolder) throws OperationFailedException {
XnioWorker worker = getXnioWorker(context);
Expand Down