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 |
delete(Object key,
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() |
Extractors |
getExtractors() |
Indexes |
getIndexes() |
String |
getName()
Returns the name of this
QueryCache. |
String |
getPublisherListenerId() |
boolean |
isEmpty() |
Set |
keySet() |
Set |
keySet(Predicate predicate) |
void |
prepopulate(Object key,
Object value)
Used during initial population of query cache.
|
boolean |
reachedMaxCapacity()
Used to quit pre-population when max size is reached.
|
void |
recreate()
Recreates this query cache.
|
int |
removeEntriesOf(int partitionId)
Scans all entries in this
QueryCache to remove matching ones
with supplied partitionId |
boolean |
removeEntryListener(String id) |
void |
set(Object key,
Object value,
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 set(Object key, Object value, EntryEventType eventType)
set in interface InternalQueryCachepublic void prepopulate(Object key, Object value)
InternalQueryCacheprepopulate in interface InternalQueryCachepublic void delete(Object key, EntryEventType eventType)
delete in interface InternalQueryCachepublic int removeEntriesOf(int partitionId)
InternalQueryCacheQueryCache to remove matching ones
with supplied partitionIdremoveEntriesOf in interface InternalQueryCachepublic IMap getDelegate()
getDelegate in interface InternalQueryCachepublic Indexes getIndexes()
getIndexes in interface InternalQueryCachepublic void clear()
clear in interface InternalQueryCachepublic void setPublisherListenerId(String publisherListenerId)
setPublisherListenerId in interface InternalQueryCachepublic String getPublisherListenerId()
getPublisherListenerId in interface InternalQueryCachepublic String getCacheId()
getCacheId in interface InternalQueryCachepublic boolean reachedMaxCapacity()
InternalQueryCachereachedMaxCapacity in interface InternalQueryCachetrue if this query cache is at its max capacity,
otherwise return falseQueryCacheConfig.isPopulate()public Extractors getExtractors()
getExtractors in interface InternalQueryCachepublic void recreate()
InternalQueryCacherecreate in interface InternalQueryCachepublic Object get(Object key)
get in interface QueryCacheIMap.get(Object)public boolean containsKey(Object key)
containsKey in interface QueryCacheIMap.containsKey(Object)public boolean containsValue(Object value)
containsValue in interface QueryCacheIMap.containsValue(Object)public boolean isEmpty()
isEmpty in interface QueryCacheMap.isEmpty()public int size()
size in interface QueryCacheMap.size()public void addIndex(String attribute, boolean ordered)
addIndex in interface QueryCacheIMap.addIndex(String, boolean)public Map getAll(Set keys)
getAll in interface QueryCacheIMap.getAll(Set)public Set keySet()
keySet in interface QueryCacheIMap.keySet()public Set keySet(Predicate predicate)
keySet in interface QueryCacheIMap.keySet(Predicate)public Set<Map.Entry> entrySet()
entrySet in interface QueryCacheIMap.entrySet()public Set<Map.Entry> entrySet(Predicate predicate)
entrySet in interface QueryCacheIMap.entrySet(Predicate)public Collection values()
values in interface QueryCacheIMap.values()public Collection values(Predicate predicate)
values in interface QueryCacheIMap.values(Predicate)public String addEntryListener(MapListener listener, boolean includeValue)
addEntryListener in interface QueryCacheIMap.addEntryListener(MapListener, boolean)public String addEntryListener(MapListener listener, Object key, boolean includeValue)
addEntryListener in interface QueryCacheIMap.addEntryListener(MapListener, Object, boolean)public String addEntryListener(MapListener listener, Predicate predicate, boolean includeValue)
addEntryListener in interface QueryCacheIMap.addEntryListener(MapListener, Predicate, boolean)public String addEntryListener(MapListener listener, Predicate predicate, Object key, boolean includeValue)
addEntryListener in interface QueryCacheIMap.addEntryListener(MapListener, Predicate, Object, boolean)public boolean removeEntryListener(String id)
removeEntryListener in interface QueryCacheIMap.removeEntryListener(String)public String getName()
QueryCacheQueryCache. The returned value will never be null.getName in interface QueryCacheQueryCache.public boolean tryRecover()
QueryCacheEventLostListener
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 QueryCachetrue if the QueryCache content will be eventually consistent, otherwise false.QueryCacheConfig.bufferSizepublic void destroy()
QueryCachedestroy in interface QueryCacheCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.