use of com.hazelcast.flakeidgen.impl.IdBatch in project hazelcast by hazelcast.
the class ClientFlakeIdGeneratorProxy method newIdBatch.
private IdBatch newIdBatch(int batchSize) {
ClientMessage requestMsg = FlakeIdGeneratorNewIdBatchCodec.encodeRequest(name, batchSize);
ClientMessage responseMsg = new ClientInvocation(getClient(), requestMsg, getName()).invoke().joinInternal();
ResponseParameters response = FlakeIdGeneratorNewIdBatchCodec.decodeResponse(responseMsg);
return new IdBatch(response.base, response.increment, response.batchSize);
}
Aggregations