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

Use @RequiredArgsConstructor on ComputeNodeInstanceContext #34091

Merged
merged 1 commit into from
Dec 17, 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 @@ -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
Loading