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

java.lang.Object
  extended by com.hazelcast.replicatedmap.impl.record.AbstractReplicatedRecordStore<K,V>
Type Parameters:
K - key type
V - value type
All Implemented Interfaces:
ReplicatedRecordStore, InitializingObject
Direct Known Subclasses:
DataReplicatedRecordStore, ObjectReplicatedRecordStorage

public abstract class AbstractReplicatedRecordStore<K,V>
extends Object

This is the base class for all ReplicatedRecordStore implementations


Field Summary
protected  Member localMember
           
protected  int localMemberHash
           
protected  LocalReplicatedMapStatsImpl mapStats
           
protected  NodeEngine nodeEngine
           
protected  ReplicatedMapConfig replicatedMapConfig
           
protected  ReplicatedMapService replicatedMapService
           
protected  ReplicationPublisher replicationPublisher
           
protected  com.hazelcast.replicatedmap.impl.record.InternalReplicatedMapStorage<K,V> storage
           
 
Constructor Summary
AbstractReplicatedRecordStore(String name, NodeEngine nodeEngine, ReplicatedMapService replicatedMapService)
           
 
Method Summary
 String addEntryListener(EntryListener listener, Object key)
           
 String addEntryListener(EntryListener listener, Predicate predicate, Object key)
           
 void clear(boolean distribute, boolean emptyReplicationQueue)
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 LocalReplicatedMapStats createReplicatedMapStats()
           
 void destroy()
           
 Set entrySet()
           
 boolean equals(Object o)
           
 void evict(Object key)
           
 void finalChunkReceived()
           
 Object get(Object key)
           
 int getLocalMemberHash()
           
protected  Object getMutex(Object key)
           
 String getName()
           
 Set<ReplicatedRecord> getRecords()
           
 ReplicatedMapService getReplicatedMapService()
           
 LocalReplicatedMapStatsImpl getReplicatedMapStats()
           
 ReplicatedRecord getReplicatedRecord(Object key)
           
 ReplicationPublisher<K,V> getReplicationPublisher()
           
 int hashCode()
           
 void initialize()
           
 boolean isEmpty()
           
 boolean isLoaded()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 Object put(Object key, Object value, long ttl, TimeUnit timeUnit)
           
 Object remove(Object key)
           
 boolean removeEntryListenerInternal(String id)
           
 void removeTombstone(Object key)
           
 int size()
           
 Collection values()
           
 Collection values(Comparator comparator)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore
marshallKey, marshallValue, unmarshallKey, unmarshallValue
 

Field Detail

mapStats

protected final LocalReplicatedMapStatsImpl mapStats

storage

protected final com.hazelcast.replicatedmap.impl.record.InternalReplicatedMapStorage<K,V> storage

replicatedMapService

protected final ReplicatedMapService replicatedMapService

replicationPublisher

protected final ReplicationPublisher replicationPublisher

replicatedMapConfig

protected final ReplicatedMapConfig replicatedMapConfig

nodeEngine

protected final NodeEngine nodeEngine

localMemberHash

protected final int localMemberHash

localMember

protected final Member localMember
Constructor Detail

AbstractReplicatedRecordStore

public AbstractReplicatedRecordStore(String name,
                                     NodeEngine nodeEngine,
                                     ReplicatedMapService replicatedMapService)
Method Detail

removeTombstone

public void removeTombstone(Object key)

remove

public Object remove(Object key)

evict

public void evict(Object key)

get

public Object get(Object key)

put

public Object put(Object key,
                  Object value)

put

public Object put(Object key,
                  Object value,
                  long ttl,
                  TimeUnit timeUnit)

containsKey

public boolean containsKey(Object key)

containsValue

public boolean containsValue(Object value)

keySet

public Set keySet()

values

public Collection values()

values

public Collection values(Comparator comparator)

entrySet

public Set entrySet()

getReplicatedRecord

public ReplicatedRecord getReplicatedRecord(Object key)

isEmpty

public boolean isEmpty()

size

public int size()

clear

public void clear(boolean distribute,
                  boolean emptyReplicationQueue)

addEntryListener

public String addEntryListener(EntryListener listener,
                               Object key)

addEntryListener

public String addEntryListener(EntryListener listener,
                               Predicate predicate,
                               Object key)

removeEntryListenerInternal

public boolean removeEntryListenerInternal(String id)

getName

public String getName()
Specified by:
getName in interface ReplicatedRecordStore

initialize

public void initialize()
Specified by:
initialize in interface InitializingObject

destroy

public void destroy()
Specified by:
destroy in interface ReplicatedRecordStore

getReplicationPublisher

public ReplicationPublisher<K,V> getReplicationPublisher()
Specified by:
getReplicationPublisher in interface ReplicatedRecordStore

createReplicatedMapStats

public LocalReplicatedMapStats createReplicatedMapStats()

getReplicatedMapStats

public LocalReplicatedMapStatsImpl getReplicatedMapStats()

finalChunkReceived

public void finalChunkReceived()

isLoaded

public boolean isLoaded()

getLocalMemberHash

public int getLocalMemberHash()

getReplicatedMapService

public ReplicatedMapService getReplicatedMapService()

getRecords

public Set<ReplicatedRecord> getRecords()

getMutex

protected Object getMutex(Object key)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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