Skip to content

Commit

Permalink
Use @requiredargsconstructor on ComputeNodeInstanceContext (#34091)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Dec 17, 2024
1 parent b77585d commit cc27876
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
import org.apache.shardingsphere.infra.instance.workerid.WorkerIdGenerator;
Expand All @@ -36,30 +37,25 @@
/**
* Compute node instance context.
*/
@RequiredArgsConstructor
@Getter
@ThreadSafe
public final class ComputeNodeInstanceContext {

private final ComputeNodeInstance instance;

private final ModeConfiguration modeConfiguration;

private final EventBusContext eventBusContext;

@Getter(AccessLevel.NONE)
private final AtomicReference<WorkerIdGenerator> workerIdGenerator = new AtomicReference<>();

private final ModeConfiguration modeConfiguration;

@Getter(AccessLevel.NONE)
private final AtomicReference<LockContext<?>> lockContext = new AtomicReference<>();

private final EventBusContext eventBusContext;

private final Collection<ComputeNodeInstance> allClusterInstances = new CopyOnWriteArrayList<>();

public ComputeNodeInstanceContext(final ComputeNodeInstance instance, final ModeConfiguration modeConfig, final EventBusContext eventBusContext) {
this.instance = instance;
this.modeConfiguration = modeConfig;
this.eventBusContext = eventBusContext;
}

/**
* Initialize compute node instance context.
*
Expand Down

0 comments on commit cc27876

Please sign in to comment.