Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.io
Interface ExternalizableLite

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractAggregator, AbstractBigDecimalAggregator, AbstractComparableAggregator, AbstractCompositeExtractor, AbstractDoubleAggregator, AbstractHttpSessionCollection.ExitAgent, AbstractHttpSessionModel, AbstractLongAggregator, AbstractPriorityTask, AllFilter, AlwaysFilter, AndFilter, AnyFilter, ArrayFilter, BetweenFilter, BigDecimalAverage, BigDecimalMax, BigDecimalMin, BigDecimalSum, Binary, ChainedComparator, ChainedExtractor, ComparableMax, ComparableMin, ComparisonFilter, ComparisonValueExtractor, CompositeAggregator, CompositeAggregator.Parallel, CompositeKey, CompositeProcessor, CompositeUpdater, ConditionalExtractor, ConditionalProcessor, ConditionalPut, ConditionalPutAll, ConditionalRemove, ContainsAllFilter, ContainsAnyFilter, ContainsFilter, Count, DistinctValues, DoubleAverage, DoubleMax, DoubleMin, DoubleSum, EntryComparator, EntryExtractor, EqualsFilter, ExtractorEventTransformer, ExtractorFilter, ExtractorProcessor, FilterTrigger, GreaterEqualsFilter, GreaterFilter, GroupAggregator, GroupAggregator.Parallel, IdentityExtractor, ImmutableArrayList, InFilter, InKeySetFilter, InverseComparator, IsNotNullFilter, IsNullFilter, KeyAssociatedFilter, KeyExtractor, LessEqualsFilter, LessFilter, LikeFilter, LimitFilter, LiteMap, LiteSet, LogThreadsHoldingLockAgent, LongMax, LongMin, LongSum, MapEventFilter, MapEventTransformerFilter, MapSet, MonolithicHttpSessionModel, MultiExtractor, NeverFilter, NotEqualsFilter, NotFilter, NullFilter, NullImplementation.NullEntryProcessor, NullImplementation.NullMap, NullImplementation.NullObservableMap, NullImplementation.NullSet, NullImplementation.NullValueExtractor, NumberIncrementor, NumberMultiplier, OptimizedHolder, OrFilter, Ownership, PartitionedFilter, PartitionSet, PortalCacheProvider.FlushAgent, PreloadRequest, PresentFilter, PriorityAggregator, PriorityFilter, PriorityProcessor, PropertyManipulator, PropertyProcessor, QueryRecorder, ReducerAggregator, ReflectionExtractor, ReflectionUpdater, RegexFilter, SafeComparator, SafeHashSet, SegmentedHashSet, SemiLiteEventTransformer, SimpleDocument, SimpleElement, SimpleElement.AttributeMap, SimpleElement.ElementList, SimplePartitionKey, SimpleQueryRecord, SimpleQueryRecord.PartialResult, SimpleQueryRecord.PartialResult.AbstractRecordableStep, SimpleQueryRecord.PartialResult.ExplainStep, SimpleQueryRecord.PartialResult.IndexLookupRecord, SimpleQueryRecord.PartialResult.Step, SimpleQueryRecord.PartialResult.TraceStep, SimpleValue, SplitHttpSessionModel, SplittableHolder, TraditionalHttpSessionModel, UID, UpdaterProcessor, UUID, ValueChangeEventFilter, VersionedPut, VersionedPutAll, WorkManager.AbstractWork, WorkManager.CollectMembershipInfo, WorkManager.ReleaseWork, WorkManager.RequestStatus, WorkManager.ScheduleWork, WorkManager.SendFeedback, WorkManager.WorkStatus, XmlBean, XorFilter

public interface ExternalizableLite
extends java.io.Serializable

Optimized serialization.

The readExternal and writeExternal methods of the ExternalizableLite interface are implemented by a class to give the class complete control over the format and contents of the stream for an object. Unlike the Externalizable interface, these methods operate on more primitive DataInput and DataOutput streams, allowing for significantly better performance, but often requiring more effort to implement.

These methods must explicitly coordinate with the supertype to save its state. When an ExternalizableLite object is reconstructed, an instance is created using the public no-arg constructor, then the readExternal method called. Therefore, in addition to the methods listed below, a public default constructor is required.

Since a graph traversal is not managed by the stream, only uni-directional object graphs (e.g. object trees) can be serialized using this approach.

Note:<b/> it is extremely important that objects that are equivalent according to their "equals()" implementation produce equivalent serialized streams. Violating this relationship will result in non-deterministic behavior for many Coherence services.

Since:
Coherence 2.1
Author:
gg 2003.02.08

Method Summary
 void readExternal(java.io.DataInput in)
          Restore the contents of this object by loading the object's state from the passed DataInput object.
 void writeExternal(java.io.DataOutput out)
          Save the contents of this object by storing the object's state into the passed DataOutput object.

 

Method Detail

readExternal

void readExternal(java.io.DataInput in)
                  throws java.io.IOException
Restore the contents of this object by loading the object's state from the passed DataInput object.
Parameters:
in - the DataInput stream to read data from in order to restore the state of this object
Throws:
java.io.IOException - if an I/O exception occurs
java.io.NotActiveException - if the object is not in its initial state, and therefore cannot be deserialized into

writeExternal

void writeExternal(java.io.DataOutput out)
                   throws java.io.IOException
Save the contents of this object by storing the object's state into the passed DataOutput object.
Parameters:
out - the DataOutput stream to write the state of this object to
Throws:
java.io.IOException - if an I/O exception occurs

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.