public interface GemfireOperations
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
boolean |
containsKeyOnServer(Object key) |
boolean |
containsValue(Object value) |
boolean |
containsValueForKey(Object key) |
<K,V> void |
create(K key,
V value) |
<T> T |
execute(GemfireCallback<T> action)
Execute the action specified by the given action object within a Region.
|
<T> T |
execute(GemfireCallback<T> action,
boolean exposeNativeRegion)
Execute the action specified by the given action object within a Region.
|
<E> SelectResults<E> |
find(String query,
Object... params)
Executes a GemFire query with the given (optional) parameters and returns the result.
|
<T> T |
findUnique(String query,
Object... params)
Executes a GemFire query with the given (optional) parameters and returns the result.
|
<K,V> V |
get(K key) |
<K,V> Map<K,V> |
getAll(Collection<?> keys) |
<K,V> V |
put(K key,
V value) |
<K,V> void |
putAll(Map<? extends K,? extends V> map) |
<K,V> V |
putIfAbsent(K key,
V value) |
<E> SelectResults<E> |
query(String query)
Shortcut for
Region.query(String) method. |
<K,V> V |
remove(K key) |
<K,V> V |
replace(K key,
V value) |
<K,V> boolean |
replace(K key,
V oldValue,
V newValue) |
boolean containsKey(Object key)
boolean containsKeyOnServer(Object key)
boolean containsValue(Object value)
boolean containsValueForKey(Object key)
<K,V> void create(K key, V value)
<K,V> V get(K key)
<K,V> Map<K,V> getAll(Collection<?> keys)
<K,V> V put(K key, V value)
<K,V> void putAll(Map<? extends K,? extends V> map)
<K,V> V putIfAbsent(K key, V value)
<K,V> V replace(K key, V value)
<K,V> boolean replace(K key, V oldValue, V newValue)
<K,V> V remove(K key)
<E> SelectResults<E> find(String query, Object... params) throws InvalidDataAccessApiUsageException
findUnique(String, Object...)
.
As oppose, to the query(String)
method, this method allows for more generic queries (against multiple regions even) to be executed.
Note that the local query service is used if the region is configured as a client without any pool configuration or server connectivity - otherwise the query service on the default pool
is being used.E
- type parameter specifying the type of the select results.query
- the OQL query statement to execute.params
- an array of Object values used as arguments to bind to the OQL query parameters (such as $1).SelectResults
instance holding the objects matching the queryInvalidDataAccessApiUsageException
- in case the query returns a single result (not a SelectResults
).QueryService.newQuery(String)
,
Query.execute(Object[])
,
SelectResults
<T> T findUnique(String query, Object... params) throws InvalidDataAccessApiUsageException
find(String, Object...)
.
As oppose, to the query(String)
method, this method allows for more generic queries (against multiple regions even) to be executed.
Note that the local query service is used if the region is configured as a client without any pool configuration or server connectivity - otherwise the query service on the default pool
is being used.T
- type parameter specifying the returned result type.query
- the OQL query statement to execute.params
- an array of Object values used as arguments to bind to the OQL query parameters (such as $1).InvalidDataAccessApiUsageException
- in case the query returns multiple objects (through SelectResults
).QueryService.newQuery(String)
,
Query.execute(Object[])
<E> SelectResults<E> query(String query)
Region.query(String)
method. Filters the values of this region using the predicate given as a string with the syntax of the WHERE clause of the query language.
The predefined variable this may be used inside the predicate to denote the current element being filtered.
This method evaluates the passed in where clause and returns results. It is supported on servers as well as clients.
When executed on a client, this method always runs on the server and returns results.
When invoking this method from the client, applications can pass in a where clause or a complete query.E
- type parameter specifying the type of the select results.query
- an OQL Query language boolean query predicate.Region.query(String)
<T> T execute(GemfireCallback<T> action) throws DataAccessException
T
- type parameter specifying the returned result type.action
- callback object that specifies the Gemfire action to execute.null
.DataAccessException
- in case of GemFire errors.<T> T execute(GemfireCallback<T> action, boolean exposeNativeRegion) throws DataAccessException
T
- type parameter specifying the returned result type.action
- callback object that specifies the Gemfire action to execute.exposeNativeRegion
- whether to expose the native GemFire region to callback code.null
.DataAccessException
- in case of GemFire errors.