public void writeData(DataOutput out) throws IOException {
   boolean hasInterfaceSet = interfaceSet != null && !interfaceSet.isEmpty();
   out.writeByte(ByteUtil.toByte(enabled, hasInterfaceSet));
   if (hasInterfaceSet) {
     out.writeInt(interfaceSet.size());
     for (final String iface : interfaceSet) {
       out.writeUTF(iface);
     }
   }
 }
 public void readData(DataInput in) throws IOException {
   boolean b[] = ByteUtil.fromByte(in.readByte());
   enabled = b[0];
   boolean hasInterfaceSet = b[1];
   if (hasInterfaceSet) {
     interfaceSet.clear();
     int size = in.readInt();
     for (int i = 0; i < size; i++) {
       interfaceSet.add(in.readUTF());
     }
   }
 }
Ejemplo n.º 3
0
 public void writeData(DataOutput out) throws IOException {
   out.writeUTF(name);
   out.writeInt(backupCount);
   out.writeInt(asyncBackupCount);
   out.writeInt(evictionPercentage);
   out.writeInt(timeToLiveSeconds);
   out.writeInt(maxIdleSeconds);
   out.writeInt(evictionDelaySeconds);
   maxSizeConfig.writeData(out);
   out.writeByte(ByteUtil.toByte(valueIndexed, readBackupData, cacheValue));
   out.writeUTF(evictionPolicy);
   out.writeUTF(mergePolicy);
   //        out.writeBoolean(clearQuick);
   nearCacheConfig.writeData(out);
   //        TODO: MapStoreConfig mapStoreConfig
 }
Ejemplo n.º 4
0
 public void readData(DataInput in) throws IOException {
   name = in.readUTF();
   backupCount = in.readInt();
   asyncBackupCount = in.readInt();
   evictionPercentage = in.readInt();
   timeToLiveSeconds = in.readInt();
   maxIdleSeconds = in.readInt();
   evictionDelaySeconds = in.readInt();
   maxSizeConfig.readData(in);
   boolean[] b = ByteUtil.fromByte(in.readByte());
   valueIndexed = b[0];
   readBackupData = b[1];
   cacheValue = b[2];
   evictionPolicy = in.readUTF();
   mergePolicy = in.readUTF();
   //        clearQuick = in.readBoolean();
   nearCacheConfig = new NearCacheConfig();
   nearCacheConfig.readData(in);
   //        TODO: MapStoreConfig mapStoreConfig
 }