/*
(non-Javadoc)

@see SimplifiedSerialization.readObject(java.io.DataInputStream,ObjectManagerState)
972751
public void readObject(java.io.DataInputStream dataInputStream,
                           ObjectManagerState objectManagerState)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "readObject",
                        "dataInputStream="
                                        + dataInputStream
                                        + " objectManagerState="
                                        + objectManagerState);

        try {
            byte version = dataInputStream.readByte();
            if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                trace.debug(this, cclass
                            , "readObject"
                            , "version=" + version + "(byte)"
                                );
            super.readObject(dataInputStream,
                             objectManagerState);
            // Re-establish the owning ConcurrentLinkedList.
            concurrentListToken = Token.restore(dataInputStream,
                                                objectManagerState);

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, "readObject", exception, "1:497:1.23");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass
                           , "readObject"
                           , "via PermanentIOException"
                                );
            throw new PermanentIOException(this,
                                           exception);
        } // catch (java.io.IOException exception).

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "readObject");
    }
646669
@Trivial
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        GetField fields = in.readFields();
        failure = (Throwable) fields.get(FAILURE, null);
        params = (String[]) fields.get(PARAMS, new String[] {});
        reason = fields.get(REASON, (short) 0);
    }
97813
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
		// read basic object and the type
		s.defaultReadObject();
		
		this.reference = InstantiationUtil.instantiate(type, CopyableValue.class);
		this.tempReference = null;
	}
261588
private void readObject(java.io.ObjectInputStream s)
        throws java.io.IOException, ClassNotFoundException {
        // Note: This must be changed if any additional fields are defined
        Object a = s.readFields().get("array", null);
        if (a == null || !a.getClass().isArray())
            throw new java.io.InvalidObjectException("Not array type");
        if (a.getClass() != Object[].class)
            a = Arrays.copyOf((Object[])a, Array.getLength(a), Object[].class);
        U.putObjectVolatile(this, ARRAY, a);
    }
134199
private void readObject(java.io.ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        in.defaultReadObject();
        _statsLock=new Object[0];
        getHandlers();
        for (int i=0;i<_handlersArray.length;i++)
            _handlersArray[i].initialize(this);
    }
588493
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        ULocale locale = (ULocale)in.readObject();
        initialize(locale);
    }
694500
private void readObject(ObjectInputStream s)
        throws IOException, ClassNotFoundException
    {
        s.defaultReadObject();
        Throwable cause = super.getCause();
        if (!(cause instanceof IOException))
            throw new InvalidObjectException("Cause must be an IOException");
    }
638597
protected ObjectManagerByteArrayOutputStream serialize(java.io.Serializable serializableObject)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "serialize",
                        new Object[] { serializableObject });

        ObjectManagerByteArrayOutputStream byteArrayOutputStream = new ObjectManagerByteArrayOutputStream();
        try {
            java.io.ObjectOutputStream objectOutputStream = new java.io.ObjectOutputStream(byteArrayOutputStream);
            objectOutputStream.writeObject(serializableObject);
            objectOutputStream.close();

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this,
                                                cclass,
                                                "serialize",
                                                exception,
                                                "1:303:1.8");
            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this,
                           cclass,
                           "serialize",
                           exception);
            throw new PermanentIOException(this,
                                           exception);
        } // catch.

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "serialize",
                       new Object[] { byteArrayOutputStream });
        return byteArrayOutputStream;
    }
1054299
public void readObject(java.io.DataInputStream dataInputStream,
                           ObjectManagerState objectManagerState)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "readObject",
                        "DataInputStream="
                                        + dataInputStream
                                        + ", ObjectManagerState="
                                        + objectManagerState);

        try {
            byte version = dataInputStream.readByte();
            if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                trace.debug(this, cclass
                            , "readObject"
                            , "version=" + version + "(byte)"
                                );
            super.readObject(dataInputStream,
                             objectManagerState);

            activeSubListCount = dataInputStream.readInt();
            subListTokens = new Token[activeSubListCount];

            for (int i = 0; i < subListTokens.length; i++) {
                subListTokens[i] = Token.restore(dataInputStream,
                                                 objectManagerState);
            } // for subLists.    

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, "readObject", exception, "1:1280:1.26");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass
                           , "readObject"
                           , "via PermanentIOException"
                                );
            throw new PermanentIOException(this,
                                           exception);
        } // catch (java.io.IOException exception).

        // Force a full search when the first removeFirst operation occurs.
        headSequenceNumber = Long.MAX_VALUE;
        headSequenceNumberLock = new HeadSequenceNumberLock();
        tailSequenceNumber = 0;
        tailSequenceNumberLock = new TailSequenceNumberLock();
        subLists = new ConcurrentSubList[subListTokens.length];

        // Defect 322295
        // This check has been added to handle the case where a ConcurrentLinkedList 
        // has been deleted but only (some or all of) the sub list deletions were 
        // forced to the object store before a crash. 
        //
        //  i.e.  [subList del][subList del][OS Force][subList del][CLList del][crash]
        //
        // This results in the ConcurrentLinkedList having tokens that point to some sub 
        // lists that no longer have managed objects so the references being setup below 
        // could be null. At recovery time however these null references will be replaced
        // with DummyManagedObjects when each individual sub list delete is replayed by
        // the log. This results in a ClassCastException below.
        //
        // To avoid the exception we only add the real sub list managed objects to the 
        // array. This should be ok as once recovery has completed the entire linked list
        // should have been deleted so no exhaustive list of sub lists is required.
        //
        // TODO: Can we avoid this check by grouping transaction work into a single checkpoint?
        for (int i = 0; i < subListTokens.length; i++) {

            ManagedObject managedObject = subListTokens[i].getManagedObject();

            if (managedObject instanceof ConcurrentSubList)
            {
                subLists[i] = (ConcurrentSubList) managedObject;
            }
        } // for subList.

        // During recovery some of the sublists may not have completed their recovery when the concurrentList is found.
        // Also some of the links in the subLists may have already been deleted by later Transactions and so be 
        // unavailable during recovery.
        // Also if we look at the sublists during recovery we create cyclic dependancies between the overall 
        // lists and the subLists. We defer setting the tailSequenceNumber until first use of the list. 

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "readObject");
    }
63679
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
   {
      ObjectInputStream.GetField fields = ois.readFields();
      String name = serialPersistentFields[ID_IDX].getName();
      this.id = fields.get(name, CONNECTION_ERROR_OCCURRED);
      name = serialPersistentFields[EXCEPTION_IDX].getName();
      this.e = (Exception) fields.get(name, null);
      name = serialPersistentFields[CONN_HANDLE_IDX].getName();
      this.connectionHandle = fields.get(name, null);
   }
375175
public void readObject (ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        _size = in.readInt();
        _values = new int[Math.max(_size, DEFAULT_CAPACITY)];
        for (int ii = 0; ii < _size; ii++) {
            _values[ii] = in.readInt();
        }
    }
410963
private void readObject(ObjectInputStream in)
        throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        if (null != params) {
            this.serializer = params.getDefaultSerializer();
        }
    }
343906
@Override
    public <T> T readDataAsObject() throws IOException {
        Data data = readData();
        return data == null ? null : (T) serializationService.toObject(data);
    }
119934
private void readObject(ObjectInputStream s) throws java.io.IOException, java.lang.ClassNotFoundException {
        throw new UnsupportedOperationException(); // not serializable
    }
125960
private void readObject(ObjectInputStream in) throws ClassNotFoundException, NoSuchMethodException, IOException {
        type = ClassRef.read(in);
        name = in.readUTF();
        val = in.readObject();
    }
353549
public void readObject(java.io.DataInputStream dataInputStream,
                           ObjectManagerState objectManagerState)
                    throws ObjectManagerException {
        final String methodName = "readObject";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName,
                        new Object[] { dataInputStream,
                                      objectManagerState });

        try {
            byte version = dataInputStream.readByte();
            if (Tracing.isAnyTracingEnabled() && trace.isDebugEnabled())
                trace.debug(this,
                            cclass,
                            methodName,
                            new Object[] { new Byte(version) });
            super.readObject(dataInputStream,
                             objectManagerState);
            if (dataInputStream.readByte() == 1) {
                // The first element in the list.
                head = Token.restore(dataInputStream,
                                     objectManagerState);
                //      The final element in the list.
                tail = Token.restore(dataInputStream,
                                     objectManagerState);
            } // if (dataInputStream.readByte() == 1).
            size = dataInputStream.readLong();
        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this,
                                                cclass,
                                                methodName,
                                                exception,
                                                "1:1620:1.40");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this,
                           cclass,
                           methodName,
                           new Object[] { exception });
            throw new PermanentIOException(this,
                                           exception);
        } // catch (java.io.IOException exception).

        // We cannot set the available head during recovery because the links may get deleted before
        // recovery is complete, instead force a scan when we use availableHead for the first time.
        availableHead = null;
        availableSize = size; // All links are initially available.

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       methodName);
    }
850579
public final void writeObject(java.io.DataOutputStream dataOutputStream)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "writeObject",
                        "dataOutputStream=" + dataOutputStream);

        try {
            dataOutputStream.writeByte(SimpleSerialVersion);
            super.writeObject(dataOutputStream);

            dataOutputStream.writeInt(activeSubListCount);
            for (int i = 0; i < subListTokens.length; i++) {
                subListTokens[i].writeObject(dataOutputStream);
            } // for subLists.

        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this,
                                                cclass,
                                                "writeObject",
                                                exception,
                                                "1:1229:1.26");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this, cclass
                           , "writeObject"
                           , "via PermanentIOException"
                                );
            throw new PermanentIOException(this,
                                           exception);
        } // catch (java.io.IOException exception).

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "writeObject");
    }