/**
  * Reads an object from a <code>DataInput</code>.
  *
  * @throws IOException If this serializer cannot read an object from <code>in</code>.
  * @throws ClassNotFoundException If the class for an object being restored cannot be found.
  * @see #toData
  */
 @Override
 public void fromData(DataInput in) throws IOException, ClassNotFoundException {
   // Note: does not call super.fromData what a HACK
   _operation = EnumListenerEvent.getEnumListenerEvent(in.readByte());
   int instantiatorCount = in.readInt(); // is byte suficient for this ?
   this.serializedInstantiators = new byte[instantiatorCount][];
   for (int i = 0; i < instantiatorCount; i++) {
     this.serializedInstantiators[i] = DataSerializer.readByteArray(in);
   }
   _membershipId = ClientProxyMembershipID.readCanonicalized(in);
   _eventIdentifier = (EventID) DataSerializer.readObject(in);
   DistributedSystem ds = InternalDistributedSystem.getAnyInstance();
   if (ds != null) {
     _logger = ds.getLogWriter().convertToLogWriterI18n();
   }
 }
Ejemplo n.º 2
0
 public static QueuedOperation createFromData(DataInput in)
     throws IOException, ClassNotFoundException {
   Operation op = Operation.fromOrdinal(in.readByte());
   Object key = null;
   byte[] value = null;
   Object valueObj = null;
   byte deserializationPolicy = DistributedCacheOperation.DESERIALIZATION_POLICY_NONE;
   Object cbArg = DataSerializer.readObject(in);
   if (op.isEntry()) {
     key = DataSerializer.readObject(in);
     if (op.isUpdate() || op.isCreate()) {
       deserializationPolicy = in.readByte();
       if (deserializationPolicy == DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) {
         valueObj = DataSerializer.readObject(in);
       } else {
         value = DataSerializer.readByteArray(in);
       }
     }
   }
   return new QueuedOperation(op, key, value, valueObj, deserializationPolicy, cbArg);
 }
 public void fromData(DataInput in) throws IOException, ClassNotFoundException {
   this.identity = DataSerializer.readByteArray(in);
   this.uniqueId = in.readInt();
   //    {toString(); this.transientPort = ((InternalDistributedMember)this.memberId).getPort();}
 }
Ejemplo n.º 4
0
 @Override
 public void fromData(DataInput in) throws IOException, ClassNotFoundException {
   this.key = DataSerializer.readByteArray(in);
 }