K - keyV - valuepublic class LazyMapEntry<K,V> extends CachedQueryEntry<K,V> implements Serializable, IdentifiedDataSerializable
Map.Entry implementation which serializes/de-serializes key and value objects on demand.
It is beneficial when you need to prevent unneeded serialization/de-serialization
when creating a Map.Entry. Mainly targeted to supply a lazy entry to
EntryProcessor.process(Map.Entry) method.
Note that this implementation is not synchronized and is not thread-safe.
LazyMapEntry itself is serializable as long as the object representations of both key and value are serializable. After serialization objects are resolved using injected SerializationService. De-serialized LazyMapEntry does contain object representation only Data representations and SerializationService is set to null. In other words: It's as usable just as a regular Map.Entry.
keyData, keyObject, valueData, valueObjectextractors, serializationService| Constructor and Description |
|---|
LazyMapEntry() |
LazyMapEntry(Data key,
Object value,
InternalSerializationService serializationService) |
LazyMapEntry(Data key,
Object value,
InternalSerializationService serializationService,
Extractors extractors) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getClassId()
Returns type identifier for this class.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
Metadata |
getMetadata() |
int |
hashCode() |
boolean |
hasNullValue()
Checks if this entry has null value without any deserialization.
|
boolean |
isModified() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
remove()
Similar to calling
setValue(V) with null but doesn't return old-value hence no extra deserialization. |
void |
setMetadata(Metadata metadata) |
V |
setValue(V value) |
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
getKey, getKeyData, getTargetObject, getValue, getValueData, initextractAttributeType, getAttributeValue, getRecord, getStoreAdapter, setRecord, setStoreAdapterclone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValuepublic LazyMapEntry()
public LazyMapEntry(Data key, Object value, InternalSerializationService serializationService)
public LazyMapEntry(Data key, Object value, InternalSerializationService serializationService, Extractors extractors)
public void remove()
setValue(V) with null but doesn't return old-value hence no extra deserialization.public boolean hasNullValue()
public boolean isModified()
public boolean equals(Object o)
public int hashCode()
public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getClassId()
IdentifiedDataSerializablegetClassId in interface IdentifiedDataSerializablepublic Metadata getMetadata()
getMetadata in class QueryableEntry<K,V>public void setMetadata(Metadata metadata)
Copyright © 2019 Hazelcast, Inc.. All rights reserved.