public void toData(DataOutput out) throws IOException { HeapDataOutputStream hdos = new HeapDataOutputStream(1000, null); if (this.cqs == null) { hdos.writeBoolean(false); } else { hdos.writeBoolean(true); InternalDataSerializer.writeArrayLength(cqs.size(), hdos); for (Iterator it=this.cqs.entrySet().iterator(); it.hasNext(); ) { Map.Entry e = (Map.Entry)it.next(); // most cq IDs and all event types are small ints, so we use an optimized // write that serializes 7 bits at a time in a compact form InternalDataSerializer.writeUnsignedVL(((Long)e.getKey()).longValue(), hdos); InternalDataSerializer.writeUnsignedVL(((Integer)e.getValue()).intValue(), hdos); } } InternalDataSerializer.writeSetOfLongs(this.interestedClients, this.longIDs, hdos); InternalDataSerializer.writeSetOfLongs(this.interestedClientsInv, this.longIDs, hdos); byte[] myData = hdos.toByteArray(); DataSerializer.writeByteArray(myData, out); }
public void toData(DataOutput out) throws IOException { HeapDataOutputStream hdos = new HeapDataOutputStream(1000, null); if (this.cqs == null) { hdos.writeBoolean(false); } else { hdos.writeBoolean(true); InternalDataSerializer.writeArrayLength(cqs.size(), hdos); for (Iterator it=this.cqs.entrySet().iterator(); it.hasNext(); ) { Map.Entry e = (Map.Entry)it.next(); // most cq IDs and all event types are small ints, so we use an optimized // write that serializes 7 bits at a time in a compact form InternalDataSerializer.writeUnsignedVL(((Long)e.getKey()).longValue(), hdos); InternalDataSerializer.writeUnsignedVL(((Integer)e.getValue()).intValue(), hdos); } } InternalDataSerializer.writeSetOfLongs(this.interestedClients, this.longIDs, hdos); InternalDataSerializer.writeSetOfLongs(this.interestedClientsInv, this.longIDs, hdos); byte[] myData = hdos.toByteArray(); DataSerializer.writeByteArray(myData, out); }
public void toDataPre_GFXD_1_4_0_0(DataOutput out) throws IOException { if (OLD_MEMBERS_OPTIMIZED) { HeapDataOutputStream hdos = new HeapDataOutputStream(1000, InternalDataSerializer.getVersionForDataStream(out)); if (this.cqs == null) { hdos.writeBoolean(false); } else { hdos.writeBoolean(true); InternalDataSerializer.writeArrayLength(cqs.size(), hdos); for (Iterator it=this.cqs.entrySet().iterator(); it.hasNext(); ) { Map.Entry e = (Map.Entry)it.next(); // most cq IDs and all event types are small ints, so we use an optimized // write that serializes 7 bits at a time in a compact form InternalDataSerializer.writeUnsignedVL(((Long)e.getKey()).longValue(), hdos); InternalDataSerializer.writeUnsignedVL(((Integer)e.getValue()).intValue(), hdos); } } InternalDataSerializer.writeSetOfLongs(this.interestedClients, this.longIDs, hdos); InternalDataSerializer.writeSetOfLongs(this.interestedClientsInv, this.longIDs, hdos); byte[] myData = hdos.toByteArray(); DataSerializer.writeByteArray(myData, out); } else { DataSerializer.writeHashMap(this.cqs, out); InternalDataSerializer.writeSetOfLongs(this.interestedClients, this.longIDs, out); InternalDataSerializer.writeSetOfLongs(this.interestedClientsInv, this.longIDs, out); } }
public void toDataPre_GFE_8_0_0_0(DataOutput out) throws IOException { if (OLD_MEMBERS_OPTIMIZED) { HeapDataOutputStream hdos = new HeapDataOutputStream(1000, InternalDataSerializer.getVersionForDataStream(out)); if (this.cqs == null) { hdos.writeBoolean(false); } else { hdos.writeBoolean(true); InternalDataSerializer.writeArrayLength(cqs.size(), hdos); for (Iterator it=this.cqs.entrySet().iterator(); it.hasNext(); ) { Map.Entry e = (Map.Entry)it.next(); // most cq IDs and all event types are small ints, so we use an optimized // write that serializes 7 bits at a time in a compact form InternalDataSerializer.writeUnsignedVL(((Long)e.getKey()).longValue(), hdos); InternalDataSerializer.writeUnsignedVL(((Integer)e.getValue()).intValue(), hdos); } } InternalDataSerializer.writeSetOfLongs(this.interestedClients, this.longIDs, hdos); InternalDataSerializer.writeSetOfLongs(this.interestedClientsInv, this.longIDs, hdos); byte[] myData = hdos.toByteArray(); DataSerializer.writeByteArray(myData, out); } else { DataSerializer.writeHashMap(this.cqs, out); InternalDataSerializer.writeSetOfLongs(this.interestedClients, this.longIDs, out); InternalDataSerializer.writeSetOfLongs(this.interestedClientsInv, this.longIDs, out); } }
heapdos.writeBoolean(requireAuthentication);
heapdos.writeBoolean(requireAuthentication);
heapdos.writeBoolean(requireAuthentication);
heapdos.writeBoolean(requireAuthentication);
bb.write((byte)(drv.isBucket()?1:0)); final EnumSet<DiskRegionFlag> flags = drv.getFlags(); bb.writeBoolean(flags.contains(DiskRegionFlag.HAS_REDUNDANT_COPY)); bb.writeBoolean(flags.contains(DiskRegionFlag.DEFER_RECOVERY)); bb.writeLong(drv.getUUID()); bb.writeUTF(drv.getPartitionName()); bb.writeInt(drv.getStartingBucketId()); bb.writeBoolean(false); // griddb flag, preserve for backwards compatibility bb.writeBoolean(drv.getEnableOffHeapMemory()); bb.writeBoolean(flags.contains(DiskRegionFlag.IS_WITH_VERSIONING)); bb.write(END_OF_RECORD_ID); writeIFRecord(bb, false); // don't do stats for these small records
bb.writeInt(drv.getStartingBucketId()); bb.writeUTF(drv.getCompressorClassName() == null ? "" : drv.getCompressorClassName()); bb.writeBoolean(flags.contains(DiskRegionFlag.IS_WITH_VERSIONING)); bb.writeBoolean(drv.getOffHeap()); bb.write(END_OF_RECORD_ID); writeIFRecord(bb, false); // don't do stats for these small records