Package com.hazelcast.nio.serialization
Interface DataSerializable
- All Known Subinterfaces:
IdentifiedDataSerializable
,Member
,ScheduledTaskStatistics
,SplitBrainMergePolicy<V,
,T, R> TenantControl
,TypedDataSerializable
- All Known Implementing Classes:
AbstractCacheConfig
,com.hazelcast.spi.impl.merge.AbstractSplitBrainMergePolicy
,AbstractWanPublisherConfig
,Address
,AliasedDiscoveryConfig
,AttributeConfig
,AwsConfig
,AzureConfig
,BitmapIndexOptions
,BTreeIndexConfig
,CacheConfig
,CachePartitionLostListenerConfig
,CacheSimpleConfig
,CacheSimpleConfig.ExpiryPolicyFactoryConfig
,CacheSimpleConfig.ExpiryPolicyFactoryConfig.DurationConfig
,CacheSimpleConfig.ExpiryPolicyFactoryConfig.TimedExpiryPolicyFactoryConfig
,CacheSimpleEntryListenerConfig
,CardinalityEstimatorConfig
,CollectionConfig
,DAG
,DataConnectionConfig
,DataPersistenceConfig
,DeltaJobConfig
,DiscardMergePolicy
,DiscoveryConfig
,DiscoveryStrategyConfig
,DiskTierConfig
,DurableExecutorConfig
,Echo
,Edge
,EdgeConfig
,EntryListenerConfig
,EurekaConfig
,EventJournalConfig
,EvictionConfig
,ExecutorConfig
,ExpirationTimeMergePolicy
,FlakeIdGeneratorConfig
,GcpConfig
,HazelcastExpiryPolicy
,HigherHitsMergePolicy
,HotRestartConfig
,HyperLogLogMergePolicy
,IndexConfig
,ItemListenerConfig
,JobConfig
,JobMetrics
,JobStatusEvent
,KubernetesConfig
,LatestAccessMergePolicy
,LatestUpdateMergePolicy
,ListConfig
,ListenerConfig
,MapConfig
,MapPartitionLostListenerConfig
,MapStoreConfig
,Measurement
,MemberVersion
,MemoryTierConfig
,MergePolicyConfig
,MerkleTreeConfig
,MultiMapConfig
,NearCacheConfig
,NearCachePreloaderConfig
,PartitionAwareKey
,PartitioningAttributeConfig
,PartitioningStrategyConfig
,PassThroughMergePolicy
,PermissionConfig
,PNCounterConfig
,PortableId
,PredicateConfig
,ProcessorMetaSupplier.ExpectNothingProcessorSupplier
,ProcessorMetaSupplier.RandomMemberPms
,ProcessorMetaSupplier.SpecificMemberPms
,PutIfAbsentMergePolicy
,QueryCacheConfig
,QueueConfig
,QueueStoreConfig
,ReliableTopicConfig
,ReplicatedMapConfig
,ResourceConfig
,RingbufferConfig
,RingbufferStoreConfig
,ScheduledExecutorConfig
,ScheduledTaskHandler
,SetConfig
,SimpleTokenCredentials
,SplitBrainProtectionConfig
,SplitBrainProtectionListenerConfig
,TieredStoreConfig
,TopicConfig
,TransactionOptions
,UserCodeNamespaceConfig
,UsernamePasswordCredentials
,Version
,Vertex
,WanBatchPublisherConfig
,WanConsumerConfig
,WanCustomPublisherConfig
,WanReplicationConfig
,WanReplicationRef
,WanSyncConfig
public interface DataSerializable
DataSerializable is a serialization method alternative to standard Java
serialization. DataSerializable is very similar to
Externalizable
and relies on reflection to create instances using class names.
Conforming classes must provide a no-arguments constructor to facilitate the creation of their instances during the deserialization. Anonymous, local and non-static member classes can't satisfy this requirement since their constructors are always accepting an instance of the enclosing class as an implicit argument, therefore they must be avoided.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Reads fields from the input streamvoid
Writes object fields to output stream
-
Method Details
-
writeData
Writes object fields to output stream- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Reads fields from the input stream- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-