com.hazelcast.replicatedmap.impl.record
Class ReplicatedRecord<K,V>

java.lang.Object
  extended by com.hazelcast.replicatedmap.impl.record.ReplicatedRecord<K,V>
Type Parameters:
K - key type
V - value type
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable

public class ReplicatedRecord<K,V>
extends Object
implements IdentifiedDataSerializable

A ReplicatedRecord is the actual data holding entity. It also collects statistic metadata.


Constructor Summary
ReplicatedRecord()
           
ReplicatedRecord(K key, V value, VectorClockTimestamp vectorClockTimestamp, int hash, long ttlMillis)
           
 
Method Summary
 VectorClockTimestamp applyAndIncrementVectorClock(VectorClockTimestamp otherVectorClockTimestamp, Member member)
           
 VectorClockTimestamp applyVectorClock(VectorClockTimestamp otherVectorClockTimestamp)
           
 boolean equals(Object o)
           
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 long getHits()
           
 int getId()
          Returns type identifier for this class.
 K getKey()
           
 K getKeyInternal()
           
 long getLastAccessTime()
           
 int getLatestUpdateHash()
           
 long getTtlMillis()
           
 long getUpdateTime()
           
 V getValue()
           
 V getValueInternal()
           
 VectorClockTimestamp getVectorClockTimestamp()
           
 int hashCode()
           
 VectorClockTimestamp incrementVectorClock(Member member)
           
 boolean isTombstone()
           
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 V setValue(V value, int hash, long ttlMillis)
           
 V setValueInternal(V value, int hash, long ttlMillis)
           
 String toString()
           
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReplicatedRecord

public ReplicatedRecord()

ReplicatedRecord

public ReplicatedRecord(K key,
                        V value,
                        VectorClockTimestamp vectorClockTimestamp,
                        int hash,
                        long ttlMillis)
Method Detail

getKey

public K getKey()

getKeyInternal

public K getKeyInternal()

getValue

public V getValue()

getValueInternal

public V getValueInternal()

isTombstone

public boolean isTombstone()

getVectorClockTimestamp

public VectorClockTimestamp getVectorClockTimestamp()

applyAndIncrementVectorClock

public VectorClockTimestamp applyAndIncrementVectorClock(VectorClockTimestamp otherVectorClockTimestamp,
                                                         Member member)

applyVectorClock

public VectorClockTimestamp applyVectorClock(VectorClockTimestamp otherVectorClockTimestamp)

incrementVectorClock

public VectorClockTimestamp incrementVectorClock(Member member)

getTtlMillis

public long getTtlMillis()

setValue

public V setValue(V value,
                  int hash,
                  long ttlMillis)

setValueInternal

public V setValueInternal(V value,
                          int hash,
                          long ttlMillis)

getUpdateTime

public long getUpdateTime()

getLatestUpdateHash

public int getLatestUpdateHash()

getHits

public long getHits()

getLastAccessTime

public long getLastAccessTime()

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id

getId

public int getId()
Description copied from interface: IdentifiedDataSerializable
Returns type identifier for this class. Id should be unique per DataSerializableFactory.

Specified by:
getId in interface IdentifiedDataSerializable
Returns:
type id

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.