protected String looseUnmarshalString(DataInput dataIn) throws IOException { if (dataIn.readBoolean()) { return dataIn.readUTF(); } else { return null; } }
protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException { byte rc[] = null; if (dataIn.readBoolean()) { int size = dataIn.readInt(); rc = new byte[size]; dataIn.readFully(rc); } return rc; }
@Override public void readFields(DataInput in) throws IOException { version = in.readLong(); boolean hasMethods = in.readBoolean(); if (hasMethods) { int numMethods = in.readInt(); methods = new int[numMethods]; for (int i=0; i<numMethods; i++) { methods[i] = in.readInt(); } } }
public void readExternal(DataInput in) throws IOException { this.jobId = in.readUTF(); this.repeat = in.readInt(); this.startTime = in.readLong(); this.delay = in.readLong(); this.nextTime = in.readLong(); this.period = in.readLong(); this.cronEntry = in.readUTF(); this.location.readExternal(in); if (in.readBoolean()) { this.lastUpdate = new Location(); this.lastUpdate.readExternal(in); } }
this.entries = list; this.seriesNum = in.readInt(); this.msgNum = in.readInt(); this.numSeries = in.readInt(); this.lastInSeries = in.readBoolean(); this.flowControlId = in.readInt(); this.remoteVersion = InternalDataSerializer.getVersionForDataStreamOrNull(in); this.isDeltaGII = in.readBoolean(); this.hasHolderToSend = in.readBoolean(); if (this.hasHolderToSend) { this.holderToSend = new RegionVersionHolder(in); int gcVersionsLength = in.readShort(); if (gcVersionsLength >= 0) { gcVersions = new HashMap<VersionSource, Long>(gcVersionsLength);
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { this.memberId = new InternalDistributedMember(); InternalDataSerializer.invokeFromData(this.memberId, in); this.prType = in.readInt(); this.isPersistent = in.readBoolean(); this.cacheLoaderWriterByte = in.readByte(); this.serialNumber = in.readInt(); }
public void readFrom(DataInput in) throws Exception { type=in.readByte(); switch(type) { case DATA: seqno=Bits.readLong(in); conn_id=in.readShort(); first=in.readBoolean(); break; case ACK: seqno=Bits.readLong(in); conn_id=in.readShort(); timestamp=Bits.readInt(in); break; case SEND_FIRST_SEQNO: timestamp=Bits.readInt(in); break; case XMIT_REQ: break; case CLOSE: conn_id=in.readShort(); break; } } }
static OfYear readFrom(DataInput in) throws IOException { return new OfYear((char)in.readUnsignedByte(), (int)in.readUnsignedByte(), (int)in.readByte(), (int)in.readUnsignedByte(), in.readBoolean(), (int)readMillis(in)); }
/** * Fill out this instance of the message using the <code>DataInput</code> Required to be a * {@link org.apache.geode.DataSerializable}Note: must be symmetric with * {@link #toData(DataOutput)}in what it reads */ @Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.flags = in.readShort(); setFlags(this.flags, in); this.regionPath = DataSerializer.readString(in); this.isTransactionDistributed = in.readBoolean(); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.processorId = in.readInt(); this.regionName = in.readUTF(); this.eventId = new EventID(); InternalDataSerializer.invokeFromData(this.eventId, in); this.isBulkOp = in.readBoolean(); }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); _isShrinked = in.readBoolean(); if (_isShrinked) { shrinkedLength = in.readLong(); } }
public static <T extends Object> T objectFromStream(DataInput in, ClassLoader loader) throws Exception { if(in == null) return null; byte b=in.readByte(); return (T)tmp.readObject(); case TYPE_BOOLEAN: return (T)(Boolean)in.readBoolean(); case TYPE_BYTE: return (T)(Byte)in.readByte(); case TYPE_CHAR: return (T)(Character)in.readChar(); case TYPE_DOUBLE: return (T)(Double)in.readDouble(); case TYPE_FLOAT: return (T)(Float)in.readFloat(); case TYPE_INT: return (T)(Integer)in.readInt(); case TYPE_LONG: return (T)(Long)in.readLong(); case TYPE_SHORT: return (T)(Short)in.readShort(); case TYPE_STRING: int str_len=in.readInt(); if(str_len == 0) return (T)""; byte[] tmp=new byte[str_len]; for(int i=0; i < str_len; i++) { tmp[i]=in.readByte(); return (T)in.readUTF(); case TYPE_BYTEARRAY: int len=in.readInt(); byte[] tmpbuf=new byte[len]; in.readFully(tmpbuf,0,tmpbuf.length); return (T)tmpbuf; default:
protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException { byte rc[] = null; if (dataIn.readBoolean()) { int size = dataIn.readInt(); rc = new byte[size]; dataIn.readFully(rc); } return rc; }
/** * Fill out this instance of the message using the <code>DataInput</code> Required to be a * {@link org.apache.geode.DataSerializable}Note: must be symmetric with * {@link #toData(DataOutput)}in what it reads */ @Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.flags = in.readShort(); setBooleans(this.flags, in); this.regionId = in.readInt(); // extra field post 9.0 if (InternalDataSerializer.getVersionForDataStream(in).compareTo(Version.GFE_90) >= 0) { this.isTransactionDistributed = in.readBoolean(); } }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { name = DataSerializer.readString(in); length = in.readLong(); chunks = in.readInt(); created = in.readLong(); modified = in.readLong(); long high = in.readLong(); long low = in.readLong(); id = new UUID(high, low); possiblyRenamed = in.readBoolean(); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { this.name = DataSerializer.readString(in); this.typeCode = in.readByte(); this.id = in.readInt(); this.units = DataSerializer.readString(in); this.desc = DataSerializer.readString(in); this.value = (Number) DataSerializer.readObject(in); this.isCounter = in.readBoolean(); }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); DestinationInfo info = (DestinationInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setOperationType(dataIn.readByte()); info.setTimeout(looseUnmarshalLong(wireFormat, dataIn)); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } }
protected String looseUnmarshalString(DataInput dataIn) throws IOException { if (dataIn.readBoolean()) { return dataIn.readUTF(); } else { return null; } }
public void readFrom(DataInput in) throws Exception { type=in.readByte(); cluster_name=Bits.readString(in); initial_discovery=in.readBoolean(); } }
protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn) throws IOException { if (wireFormat.isCacheEnabled()) { if (dataIn.readBoolean()) { short index = dataIn.readShort(); DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn); wireFormat.setInUnmarshallCache(index, object); return object; } else { short index = dataIn.readShort(); return wireFormat.getFromUnmarshallCache(index); } } else { return wireFormat.looseUnmarshalNestedObject(dataIn); } }