IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.plugins
Class LogSequenceTransformer

java.lang.Object
  extended by com.ibm.websphere.objectgrid.plugins.LogSequenceTransformer

public class LogSequenceTransformer
extends Object

This class is used to serialize and de-serialize LogSequences. It provides an alternative to the standard readObject/writeObject mechanism that is part of the LogSequence implementation. By using these alternative methods, the user has more control over what parts and how the LogSequence is serialized and inflated.

Since:
WAS XD 6.0
See Also:
LogSequence

Constructor Summary
LogSequenceTransformer()
           
 
Method Summary
static Collection inflate(ObjectInputStream stream, ObjectGrid objectGrid)
          Provides an alternative to the standard serialization method of readObject.
static void serialize(Collection logSequences, ObjectOutputStream stream, LogSequenceFilter filter, DistributionMode mode)
          Provides an alternative to the standard serialization method of writeObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogSequenceTransformer

public LogSequenceTransformer()
Method Detail

serialize

public static void serialize(Collection logSequences,
                             ObjectOutputStream stream,
                             LogSequenceFilter filter,
                             DistributionMode mode)
                      throws IOException
Provides an alternative to the standard serialization method of writeObject.

This method allows the caller to provide a filter for determining which LogElements to include in the serialization process. The DistributionMode parameter allows the caller to control the serialization process.

Parameters:
logSequences - a collection of LogSequences that need to be serialized into the stream. Caller must guarantee the collection contains only LogSequence objects.
stream - the stream to serialize the LogSequence into. Caller must guarantee this argument is not null
filter - a filter callback for determining whether to include a given LogElement in the serialized output. This argument is optional. A null value indicates not to filter the LogSequences
mode - Conditional or unconditional distribution of changes. The call must guarantee this argument is not null
Throws:
IOException - if an error occurs during serialization of the LogSequences
See Also:
LogSequenceFilter, DistributionMode

inflate

public static Collection inflate(ObjectInputStream stream,
                                 ObjectGrid objectGrid)
                          throws IOException,
                                 ClassNotFoundException
Provides an alternative to the standard serialization method of readObject.

The caller needs to pass in the stream that contains the serialized version of the LogSequences that were serialized using the serialize method.

Parameters:
stream - the stream to de-serialize the LogSequences from.
objectGrid - the ObjectGrid instance that owns this LogSequence.
Returns:
a Collection of LogSequences
Throws:
IOException - if an error occurs during deserialization of the LogSequences
ClassNotFoundException - if a class isn't found during deserialization of the LogSequences
See Also:
serialize(Collection, ObjectOutputStream, LogSequenceFilter, DistributionMode)

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.