@Override
 protected void writeInternal(ObjectDataOutput out) throws IOException {
   super.writeInternal(out);
   out.writeBoolean(replaceExistingValues);
   out.writeBoolean(keys != null);
   if (keys != null) {
     out.writeInt(keys.size());
     for (Data key : keys) {
       out.writeData(key);
     }
   }
 }
 @Override
 protected void readInternal(ObjectDataInput in) throws IOException {
   super.readInternal(in);
   replaceExistingValues = in.readBoolean();
   boolean isKeysNotNull = in.readBoolean();
   if (isKeysNotNull) {
     int size = in.readInt();
     keys = new HashSet<Data>(size);
     for (int i = 0; i < size; i++) {
       Data key = in.readData();
       keys.add(key);
     }
   }
 }
Exemplo n.º 3
0
 @Override
 public void readInternal(ObjectDataInput in) throws IOException {
   super.readInternal(in);
   permitCount = in.readInt();
 }
Exemplo n.º 4
0
 @Override
 public void writeInternal(ObjectDataOutput out) throws IOException {
   super.writeInternal(out);
   out.writeInt(permitCount);
 }