public SequencerDefinition(@Nonnull String sequencerName, @Nonnull SnowcastEpoch epoch,
@Min(128) @Max(8192) int maxLogicalNodeCount,
@Nonnegative @Max(Short.MAX_VALUE) short backupCount) {
if (maxLogicalNodeCount < NODE_ID_LOWER_BOUND) {
throw exception(SnowcastMaxLogicalNodeIdOutOfBoundsException::new, //
ILLEGAL_MAX_LOGICAL_NODE_ID_BOUNDARY, "smaller", NODE_ID_LOWER_BOUND);
}
if (maxLogicalNodeCount > NODE_ID_UPPER_BOUND) {
throw exception(SnowcastMaxLogicalNodeIdOutOfBoundsException::new, //
ILLEGAL_MAX_LOGICAL_NODE_ID_BOUNDARY, "larger", NODE_ID_UPPER_BOUND);
}
this.sequencerName = sequencerName;
this.epoch = epoch;
this.maxLogicalNodeCount = maxLogicalNodeCount;
this.backupCount = backupCount;
this.boundedMaxLogicalNodeCount = InternalSequencerUtils.calculateBoundedMaxLogicalNodeCount(maxLogicalNodeCount);
}
SequencerDefinition.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:snowcast
作者:
评论列表
文章目录