Skip to content

Commit

Permalink
[Java] Surface the clusterId in the ConsensusModuleControl interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeb01 committed Nov 25, 2024
1 parent 1dd7404 commit c444784
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,14 @@ public int commitPositionCounterId()
return ctx.commitPositionCounter().id();
}

/**
* {@inheritDoc}
*/
public int clusterId()
{
return ctx.clusterId();
}

public void onLoadBeginSnapshot(
final int appVersion, final TimeUnit timeUnit, final DirectBuffer buffer, final int offset, final int length)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,12 @@ public interface ConsensusModuleControl
* @return commit position counter id.
*/
int commitPositionCounterId();

/**
* Numeric id for the cluster (used when running multiple clusters on the same media driver).
*
* @return numeric id for the cluster.
* @see ConsensusModule.Context#clusterId(int)
*/
int clusterId();
}

0 comments on commit c444784

Please sign in to comment.