Package com.tangosol.coherence.rest
Class EntrySetResource
java.lang.Object
com.tangosol.coherence.rest.EntrySetResource
REST resource representing a set of cache entries.
- Author:
- as 2011.06.28
-
Field Summary
Modifier and TypeFieldDescriptionprotected AggregatorRegistry
Aggregator registry that is used to map the given aggregator name to an EntryAggregator instance.protected NamedCache
Cache which stores the referenced entries.protected Class
Class of the referenced entries' values.protected ProcessorRegistry
a processor registry that is used to map the given processor name to an EntryProcessor instance.protected Set
Referenced entries' keys. -
Constructor Summary
ConstructorDescriptionEntrySetResource
(NamedCache cache, Set setKeys, Class clzValue) Construct an EntrySetResource. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
Perform an aggregating operation against the entries.jakarta.ws.rs.core.Response
delete()
Remove the entries.jakarta.ws.rs.core.Response
getEntries
(PropertySet propertySet) jakarta.ws.rs.core.Response
getValues
(PropertySet propertySet) Return the entries' values or a subset of their properties.jakarta.ws.rs.core.Response
Invoke the specified processor against the entries.protected void
remove()
Remove the entries from the cache.protected Collection
values()
Get the entries' values.
-
Field Details
-
m_cache
Cache which stores the referenced entries. -
m_setKeys
Referenced entries' keys. -
m_clzValue
Class of the referenced entries' values. -
m_aggregatorRegistry
Aggregator registry that is used to map the given aggregator name to an EntryAggregator instance. -
m_processorRegistry
a processor registry that is used to map the given processor name to an EntryProcessor instance.
-
-
Constructor Details
-
EntrySetResource
Construct an EntrySetResource.- Parameters:
cache
- cache that stores the referenced entriessetKeys
- keys of the referenced entriesclzValue
- class of the referenced entries' values
-
-
Method Details
-
getValues
@GET @Produces({"application/json","application/xml","application/octet-stream"}) public jakarta.ws.rs.core.Response getValues(@MatrixParam("p") PropertySet propertySet) Return the entries' values or a subset of their properties.- Parameters:
propertySet
- properties to return (if null, values will be returned)- Returns:
- entries' values or a subset of their properties
-
getEntries
@GET @Path("entries") @Produces({"application/json","application/xml","text/plain"}) public jakarta.ws.rs.core.Response getEntries(@MatrixParam("p") PropertySet propertySet) -
aggregate
@GET @Path("{aggr: \\s*(\\w(?:\\w|-)*)\\((.*)\\)}") @Produces({"application/json","application/xml","text/plain"}) public jakarta.ws.rs.core.Response aggregate(@PathParam("aggr") String sAggr) Perform an aggregating operation against the entries.- Parameters:
sAggr
- name of the aggregator- Returns:
- the result of the aggregation
-
process
@POST @Path("{proc: \\s*(\\w(?:\\w|-)*)\\((.*)\\)}") @Produces({"application/json","application/xml"}) public jakarta.ws.rs.core.Response process(@PathParam("proc") String sProc) Invoke the specified processor against the entries.- Parameters:
sProc
- name of the processor- Returns:
- a Map containing the results of invoking the EntryProcessor against the entries
-
delete
@DELETE public jakarta.ws.rs.core.Response delete()Remove the entries.- Returns:
- response with a status of 200 (OK)
-
values
Get the entries' values.- Returns:
- entries' values
-
remove
protected void remove()Remove the entries from the cache.
-