public interface SearchService
Modifier and Type | Method | Description |
---|---|---|
int |
executeNonQuery(QueryCommand queryCommand) |
Executes Delete statements on cache.
|
CacheReader |
executeReader(QueryCommand queryCommand) |
Performs search on the cache based on the query specified.
|
CacheReader |
executeReader(QueryCommand queryCommand,
boolean getData,
int chunkSize) |
Performs search on the cache based on the query specified.
|
<T> T |
executeScalar(QueryCommand queryCommand,
java.lang.Class<?> cls) |
Executes the query, and returns the first column of the first row in the result set returned by the query.
|
<T> java.util.Map<java.lang.String,T> |
getByTag(Tag tag) |
Gets all the cached items with the specified tag.
|
<T> java.util.Map<java.lang.String,T> |
getByTag(java.lang.String wildCardExpression) |
Gets all the cached objects with the wild card supported tag.
|
<T> java.util.Map<java.lang.String,T> |
getByTags(java.util.List<Tag> tags,
TagSearchOptions type) |
Returns the cached objects that have tags with specified
TagSearchOptions . |
<T> java.util.Map<java.lang.String,T> |
getGroupData(java.lang.String group) |
Retrieves the key and value pairs of the specified group.
|
java.util.Collection<java.lang.String> |
getGroupKeys(java.lang.String group) |
Retrieves the keys of the items in the specified group.
|
java.util.Collection<java.lang.String> |
getKeysByTag(Tag tag) |
Gets all keys of the objects with the specified tag.
|
java.util.Collection<java.lang.String> |
getKeysByTag(java.lang.String wildCardExpression) |
Gets all the keys with the wild card supported tag.
|
java.util.Collection<java.lang.String> |
getKeysByTags(java.util.List<Tag> tags,
TagSearchOptions type) |
Returns keys of the cached items that have tags with specified
TagSearchOptions . |
void |
removeByTag(Tag tag) |
Removes the cached objects with the specified tag.
|
void |
removeByTags(java.util.List<Tag> tags,
TagSearchOptions type) |
Removes the cached objects that have tags with specified
TagSearchOptions . |
void |
removeGroupData(java.lang.String group) |
Remove the data items pertaining to the specified group from cache.
|
int executeNonQuery(QueryCommand queryCommand) throws CacheException, java.lang.IllegalArgumentException
queryCommand
- QueryCommand
containing query text and values.CacheException
java.lang.IllegalArgumentException
CacheReader executeReader(QueryCommand queryCommand) throws CacheException, java.lang.IllegalArgumentException
queryCommand
- QueryCommand
containing query text and values.CacheException
java.lang.IllegalArgumentException
CacheReader executeReader(QueryCommand queryCommand, boolean getData, int chunkSize) throws CacheException, java.lang.IllegalArgumentException
queryCommand
- QueryCommand
containing query text and values.getData
- Flag to indicate whether the resulting values have to be returned with keys or not.chunkSize
- Size of data/keys packets received after search, default value is 512*1024 KB.CacheException
java.lang.IllegalArgumentException
<T> T executeScalar(QueryCommand queryCommand, java.lang.Class<?> cls) throws CacheException, java.lang.IllegalArgumentException
T
- Specifies the type of value obtained from the cache.queryCommand
- QueryCommand
containing query text and values.cls
- Specifies the class of value obtained from the cache.CacheException
java.lang.IllegalArgumentException
void removeByTag(Tag tag) throws CacheException, java.lang.IllegalArgumentException
tag
- A Tag to search cache with.CacheException
java.lang.IllegalArgumentException
void removeByTags(java.util.List<Tag> tags, TagSearchOptions type) throws CacheException, java.lang.IllegalArgumentException
TagSearchOptions
.tags
- List of tags to search cache with.type
- TagSearchOptions
specifies the search type for the tags.CacheException
java.lang.IllegalArgumentException
<T> java.util.Map<java.lang.String,T> getByTag(Tag tag) throws CacheException, java.lang.IllegalArgumentException
T
- Specifies the type of value obtained from the cache.tag
- Name of tag to search the cache items with.CacheException
java.lang.IllegalArgumentException
<T> java.util.Map<java.lang.String,T> getByTag(java.lang.String wildCardExpression) throws CacheException, java.lang.IllegalArgumentException
T
- Specifies the type of value obtained from the cache.wildCardExpression
- The wild card Expression to search with.CacheException
java.lang.IllegalArgumentException
<T> java.util.Map<java.lang.String,T> getByTags(java.util.List<Tag> tags, TagSearchOptions type) throws CacheException, java.lang.IllegalArgumentException
TagSearchOptions
.T
- Specifies the type of value obtained from the cache.tags
- List of tags to search cache with.type
- TagSearchOptions
specifies the search type for the tagsCacheException
java.lang.IllegalArgumentException
java.util.Collection<java.lang.String> getKeysByTag(Tag tag) throws CacheException, java.lang.IllegalArgumentException
tag
- The tag to search the cache with.CacheException
java.lang.IllegalArgumentException
java.util.Collection<java.lang.String> getKeysByTag(java.lang.String wildCardExpression) throws CacheException, java.lang.IllegalArgumentException
wildCardExpression
- The wild card Expression to search with.CacheException
java.lang.IllegalArgumentException
java.util.Collection<java.lang.String> getKeysByTags(java.util.List<Tag> tags, TagSearchOptions type) throws CacheException, java.lang.IllegalArgumentException
TagSearchOptions
.tags
- List of tags to search cache with.type
- TagSearchOptions
specifies the search type for the tags.CacheException
java.lang.IllegalArgumentException
void removeGroupData(java.lang.String group) throws CacheException, java.lang.IllegalArgumentException
group
- Name of group to be removed.CacheException
java.lang.IllegalArgumentException
java.util.Collection<java.lang.String> getGroupKeys(java.lang.String group) throws CacheException, java.lang.IllegalArgumentException
group
- Name of group whose keys are to be returned.CacheException
java.lang.IllegalArgumentException
<T> java.util.Map<java.lang.String,T> getGroupData(java.lang.String group) throws CacheException, java.lang.IllegalArgumentException
T
- Specifies the type of value obtained from the cache.group
- Name of group whose data is to be returned.CacheException
java.lang.IllegalArgumentException