public final class NullQueryCache extends Object implements InternalQueryCache
InternalQueryCache
implementation.Modifier and Type | Field and Description |
---|---|
static InternalQueryCache |
NULL_QUERY_CACHE
Null query cache implementation.
|
Modifier and Type | Method and Description |
---|---|
String |
addEntryListener(MapListener listener,
boolean includeValue) |
String |
addEntryListener(MapListener listener,
Object key,
boolean includeValue) |
String |
addEntryListener(MapListener listener,
Predicate predicate,
boolean includeValue) |
String |
addEntryListener(MapListener listener,
Predicate predicate,
Object key,
boolean includeValue) |
void |
addIndex(String attribute,
boolean ordered) |
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
void |
deleteInternal(Object key,
boolean callDelegate,
EntryEventType eventType) |
void |
destroy()
Destroys this cache.
|
Set<Map.Entry> |
entrySet() |
Set<Map.Entry> |
entrySet(Predicate predicate) |
Object |
get(Object key) |
Map |
getAll(Set keys) |
String |
getCacheId() |
IMap |
getDelegate() |
Indexes |
getIndexes() |
String |
getName()
Returns the name of this
QueryCache . |
boolean |
isEmpty() |
Set |
keySet() |
Set |
keySet(Predicate predicate) |
int |
removeEntriesOf(int partitionId)
Scans all entries in this
QueryCache to remove matching ones
with supplied partitionId |
boolean |
removeEntryListener(String id) |
void |
setInternal(Object key,
Object value,
boolean callDelegate,
EntryEventType eventType) |
void |
setPublisherListenerId(String publisherListenerId) |
int |
size() |
boolean |
tryRecover()
This method can be used to recover from a possible event loss situation.
|
Collection |
values() |
Collection |
values(Predicate predicate) |
public static final InternalQueryCache NULL_QUERY_CACHE
public void setInternal(Object key, Object value, boolean callDelegate, EntryEventType eventType)
setInternal
in interface InternalQueryCache
public void deleteInternal(Object key, boolean callDelegate, EntryEventType eventType)
deleteInternal
in interface InternalQueryCache
public int removeEntriesOf(int partitionId)
InternalQueryCache
QueryCache
to remove matching ones
with supplied partitionId
removeEntriesOf
in interface InternalQueryCache
public IMap getDelegate()
getDelegate
in interface InternalQueryCache
public Indexes getIndexes()
getIndexes
in interface InternalQueryCache
public void clear()
clear
in interface InternalQueryCache
public void setPublisherListenerId(String publisherListenerId)
setPublisherListenerId
in interface InternalQueryCache
public String getCacheId()
getCacheId
in interface InternalQueryCache
public Object get(Object key)
get
in interface QueryCache
IMap.get(Object)
public boolean containsKey(Object key)
containsKey
in interface QueryCache
IMap.containsKey(Object)
public boolean containsValue(Object value)
containsValue
in interface QueryCache
IMap.containsValue(Object)
public boolean isEmpty()
isEmpty
in interface QueryCache
Map.isEmpty()
public int size()
size
in interface QueryCache
Map.size()
public void addIndex(String attribute, boolean ordered)
addIndex
in interface QueryCache
IMap.addIndex(String, boolean)
public Map getAll(Set keys)
getAll
in interface QueryCache
IMap.getAll(Set)
public Set keySet()
keySet
in interface QueryCache
IMap.keySet()
public Set keySet(Predicate predicate)
keySet
in interface QueryCache
IMap.keySet(Predicate)
public Set<Map.Entry> entrySet()
entrySet
in interface QueryCache
IMap.entrySet()
public Set<Map.Entry> entrySet(Predicate predicate)
entrySet
in interface QueryCache
IMap.entrySet(Predicate)
public Collection values()
values
in interface QueryCache
IMap.values()
public Collection values(Predicate predicate)
values
in interface QueryCache
IMap.values(Predicate)
public String addEntryListener(MapListener listener, boolean includeValue)
addEntryListener
in interface QueryCache
IMap.addEntryListener(MapListener, boolean)
public String addEntryListener(MapListener listener, Object key, boolean includeValue)
addEntryListener
in interface QueryCache
IMap.addEntryListener(MapListener, Object, boolean)
public String addEntryListener(MapListener listener, Predicate predicate, boolean includeValue)
addEntryListener
in interface QueryCache
IMap.addEntryListener(MapListener, Predicate, boolean)
public String addEntryListener(MapListener listener, Predicate predicate, Object key, boolean includeValue)
addEntryListener
in interface QueryCache
IMap.addEntryListener(MapListener, Predicate, Object, boolean)
public boolean removeEntryListener(String id)
removeEntryListener
in interface QueryCache
IMap.removeEntryListener(String)
public String getName()
QueryCache
QueryCache
. The returned value will never be null.getName
in interface QueryCache
QueryCache
.public boolean tryRecover()
QueryCache
EventLostListener
This method tries to make consistent the data in this QueryCache
with the data in the underlying IMap
by replaying the events after last consistently received ones. As a result of this replaying logic, same event may
appear more than once to the QueryCache
listeners.
This method returns false
if the event is not in the buffer of event publisher side. That means recovery is not
possible.tryRecover
in interface QueryCache
true
if the QueryCache
content will be eventually consistent, otherwise false
.QueryCacheConfig.bufferSize
public void destroy()
QueryCache
destroy
in interface QueryCache
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.