@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { this.prId = in.readInt(); this.scope = Scope.fromOrdinal(in.readByte()); this.pAttrs = PartitionAttributesImpl.createFromData(in); this.isDestroying = in.readBoolean(); this.isColocationComplete = in.readBoolean(); this.nodes = new VersionedArrayList(); InternalDataSerializer.invokeFromData(this.nodes, in); this.partitionResolver = DataSerializer.readString(in); this.colocatedWith = DataSerializer.readString(in); this.fullPath = DataSerializer.readString(in); this.ea = EvictionAttributesImpl.createFromData(in); this.regionIdleTimeout = ExpirationAttributes.createFromData(in); this.regionTimeToLive = ExpirationAttributes.createFromData(in); this.entryIdleTimeout = ExpirationAttributes.createFromData(in); this.entryTimeToLive = ExpirationAttributes.createFromData(in); this.firstDataStoreCreated = in.readBoolean(); this.elderFPAs = DataSerializer.readObject(in); if (this.elderFPAs == null) { this.elderFPAs = new LinkedHashSet<FixedPartitionAttributesImpl>(); } this.partitionListenerClassNames = DataSerializer.readArrayList(in); this.gatewaySenderIds = DataSerializer.readObject(in); if (this.gatewaySenderIds == null) { this.gatewaySenderIds = Collections.emptySet(); } }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { key = DataSerializer.readObject(in); originKey = DataSerializer.readObject(in); nodeChange = DataSerializer.readBoolean(in); values = DataSerializer.readHashMap(in); operation = DataSerializer.readString(in); }
public void fromData(DataInput in) throws IOException, ClassNotFoundException { this.redundancy = in.readInt(); this.totalMaxMemory = in.readLong(); this.localMaxMemory = in.readInt(); this.totalNumBuckets = in.readInt(); this.colocatedRegionName = DataSerializer.readString(in); this.localProperties = (Properties) DataSerializer.readObject(in); this.globalProperties = (Properties) DataSerializer.readObject(in); this.recoveryDelay = in.readLong(); this.startupRecoveryDelay = in.readLong(); this.fixedPAttrs = DataSerializer.readObject(in); }
/** * Reads the state of this object from the given <code>DataInput</code>. * * @gfcodegen This code is generated by gfcodegen. */ public void fromData(DataInput input) throws IOException, ClassNotFoundException { name = DataSerializer.readString(input); // isReal = DataSerializer.readBoolean(input); fullPath = DataSerializer.readString(input); childList = DataSerializer.readObject(input); attrInfo = DataSerializer.readObject(input); temporalType = DataSerializer.readObject(input); keyTypeName = DataSerializer.readString(input); valueTypeName = DataSerializer.readString(input); size = DataSerializer.readPrimitiveInt(input); primaryBucketInfoList = DataSerializer.readObject(input); redundantBucketInfoList = DataSerializer.readObject(input); }
/* package */ boolean recoverFromFile(File file) throws InternalGemFireException { if (!file.exists()) { return false; } logger.info("Peer locator recovering from " + file.getAbsolutePath()); try (ObjectInput ois = new ObjectInputStream(new FileInputStream(file))) { if (ois.readInt() != LOCATOR_FILE_STAMP) { return false; } ObjectInput ois2 = ois; int version = ois2.readInt(); if (version != Version.CURRENT_ORDINAL) { Version geodeVersion = Version.fromOrdinalNoThrow((short) version, false); logger.info("Peer locator found that persistent view was written with {}", geodeVersion); ois2 = new VersionedObjectInput(ois2, geodeVersion); } Object o = DataSerializer.readObject(ois2); this.view = (NetView) o; logger.info("Peer locator initial membership is " + view); return true; } catch (Exception e) { String msg = LOCATOR_UNABLE_TO_RECOVER_VIEW.toLocalizedString(file.toString()); logger.warn(msg, e); if (!file.delete() && file.exists()) { logger.warn("Peer locator was unable to recover from or delete " + file); this.viewFile = null; } throw new InternalGemFireException(msg, e); } }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.prId = in.readInt(); this.processorId = in.readInt(); this.profiles = DataSerializer.readObject(in); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); int i = in.readInt(); GemFireHealth.Health oHC = (GemFireHealth.Health) DataSerializer.readObject(in); init_(i, oHC); }
@Override public void fromData(DataInput din) throws IOException, ClassNotFoundException { super.fromData(din); processorId = din.readInt(); channelState = DataSerializer.readHashMap(din); requestingMember = (DistributedMember) DataSerializer.readObject(din); this.isSingleFlushTo = din.readBoolean(); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { this.type = DataSerializer.readString(in); this.attributes = DataSerializer.readObject(in); this.xmlDefinition = DataSerializer.readString(in); this.searchString = DataSerializer.readString(in); this.prefix = DataSerializer.readString(in); this.namespace = DataSerializer.readString(in); }
public static ClientProxyMembershipID readCanonicalized(DataInput in) throws IOException, ClassNotFoundException { ClientProxyMembershipID result = DataSerializer.readObject(in); // We can't canonicalize if we have no identity. // I only saw this happen in unit tests that serialize "new ClientProxyMembershipID()". if (result == null || result.identity == null) { return result; } return result.canonicalReference(); }
@Override public void fromData(DataInput din) throws IOException, ClassNotFoundException { super.fromData(din); relayRecipient = (DistributedMember) DataSerializer.readObject(din); processorId = din.readInt(); processorType = din.readInt(); allRegions = din.readBoolean(); if (!allRegions) { regionPath = DataSerializer.readString(din); } }
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 { boolean hasHost = in.readBoolean(); if (hasHost) { host = DataSerializer.readInetAddress(in); } boolean hasDirectory = in.readBoolean(); if (hasDirectory) { directory = DataSerializer.readString(in); } diskStoreID = DataSerializer.readObject(in); revokedTime = in.readLong(); }
protected void setFlags(short flags, DataInput in) throws IOException, ClassNotFoundException { if ((flags & HAS_PROCESSOR_ID) != 0) { this.processorId = in.readInt(); ReplyProcessor21.setMessageRPId(this.processorId); } if ((flags & HAS_PROCESSOR_TYPE) != 0) { this.processorType = in.readByte(); } if ((flags & HAS_TX_ID) != 0) { this.txUniqId = in.readInt(); } if ((flags & HAS_TX_MEMBERID) != 0) { this.txMemberId = DataSerializer.readObject(in); } }
/** * deserializes the membership id, if necessary, and returns it. All access to membershipId should * be through this method */ public DistributedMember getDistributedMember() { if (memberId == null) { ByteArrayInputStream bais = new ByteArrayInputStream(identity); DataInputStream dis = new VersionedDataInputStream(bais, Version.CURRENT); try { memberId = (DistributedMember) DataSerializer.readObject(dis); } catch (Exception e) { logger.error( LocalizedMessage.create( LocalizedStrings.ClientProxyMembershipID_UNABLE_TO_DESERIALIZE_MEMBERSHIP_ID), e); } } return memberId; }
/** * 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(); } }
@Override public void fromData(DataInput din) throws IOException, ClassNotFoundException { super.fromData(din); sendingMember = (DistributedMember) DataSerializer.readObject(din); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.bridgeInfo = (RemoteBridgeServer) DataSerializer.readObject(in); this.exception = (Exception) DataSerializer.readObject(in); }
/** * Reads the state of this object from the given <code>DataInput</code>. * * @gfcodegen This code is generated by gfcodegen. */ public void fromData(DataInput input) throws IOException, ClassNotFoundException { item = DataSerializer.readObject(input); bucketId = DataSerializer.readPrimitiveInt(input); resultIndex = DataSerializer.readPrimitiveInt(input); }
public void fromData(DataInput in) throws IOException, ClassNotFoundException { this._def = (StatAlertDefinition) DataSerializer.readObject(in); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { super.fromData(in); this.elementType = (ObjectType) DataSerializer.readObject(in); }