org.hyperledger.fabric.client.StartPositionBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-gateway Show documentation
Show all versions of fabric-gateway Show documentation
Hyperledger Fabric Gateway client API for Java
The newest version!
/*
* Copyright 2022 IBM All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.fabric.client;
import org.hyperledger.fabric.protos.orderer.SeekNextCommit;
import org.hyperledger.fabric.protos.orderer.SeekPosition;
import org.hyperledger.fabric.protos.orderer.SeekSpecified;
final class StartPositionBuilder implements Builder {
private final SeekPosition.Builder builder =
SeekPosition.newBuilder().setNextCommit(SeekNextCommit.getDefaultInstance());
public StartPositionBuilder startBlock(final long blockNumber) {
SeekSpecified specified =
SeekSpecified.newBuilder().setNumber(blockNumber).build();
builder.setSpecified(specified);
return this;
}
@Override
public SeekPosition build() {
return builder.build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy