Esempio n. 1
0
 // 从proto对象构造回object
 private Identity build(BatchProto.Identity identityProto) {
   Identity identity = new Identity();
   identity.setChannelId(identityProto.getChannelId());
   identity.setPipelineId(identityProto.getPipelineId());
   identity.setProcessId(identityProto.getProcessId());
   return identity;
 }
Esempio n. 2
0
 // 构造proto对象
 private BatchProto.Identity build(Identity identity) {
   BatchProto.Identity.Builder identityBuilder = BatchProto.Identity.newBuilder();
   identityBuilder.setChannelId(identity.getChannelId());
   identityBuilder.setPipelineId(identity.getPipelineId());
   identityBuilder.setProcessId(identity.getProcessId());
   return identityBuilder.build();
 }