Package com.tangosol.coherence.rest
Class EntrySetResource
- java.lang.Object
-
- com.tangosol.coherence.rest.EntrySetResource
-
public class EntrySetResource extends Object
REST resource representing a set of cache entries.- Author:
- as 2011.06.28
-
-
Field Summary
Fields Modifier and Type Field Description protected AggregatorRegistry
m_aggregatorRegistry
Aggregator registry that is used to map the given aggregator name to an EntryAggregator instance.protected NamedCache
m_cache
Cache which stores the referenced entries.protected Class
m_clzValue
Class of the referenced entries' values.protected ProcessorRegistry
m_processorRegistry
a processor registry that is used to map the given processor name to an EntryProcessor instance.protected Set
m_setKeys
Referenced entries' keys.
-
Constructor Summary
Constructors Constructor Description EntrySetResource(NamedCache cache, Set setKeys, Class clzValue)
Construct an EntrySetResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
aggregate(String sAggr)
Perform an aggregating operation against the entries.javax.ws.rs.core.Response
delete()
Remove the entries.javax.ws.rs.core.Response
getEntries(PropertySet propertySet)
javax.ws.rs.core.Response
getValues(PropertySet propertySet)
Return the entries' values or a subset of their properties.javax.ws.rs.core.Response
process(String sProc)
Invoke the specified processor against the entries.protected void
remove()
Remove the entries from the cache.protected Collection
values()
Get the entries' values.
-
-
-
Field Detail
-
m_cache
protected NamedCache m_cache
Cache which stores the referenced entries.
-
m_setKeys
protected Set m_setKeys
Referenced entries' keys.
-
m_clzValue
protected Class m_clzValue
Class of the referenced entries' values.
-
m_aggregatorRegistry
@Inject protected AggregatorRegistry m_aggregatorRegistry
Aggregator registry that is used to map the given aggregator name to an EntryAggregator instance.
-
m_processorRegistry
@Inject protected ProcessorRegistry m_processorRegistry
a processor registry that is used to map the given processor name to an EntryProcessor instance.
-
-
Constructor Detail
-
EntrySetResource
public EntrySetResource(NamedCache cache, Set setKeys, Class clzValue)
Construct an EntrySetResource.- Parameters:
cache
- cache that stores the referenced entriessetKeys
- keys of the referenced entriesclzValue
- class of the referenced entries' values
-
-
Method Detail
-
getValues
@GET @Produces({"application/json","application/xml","application/octet-stream"}) public javax.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 javax.ws.rs.core.Response getEntries(@MatrixParam("p") PropertySet propertySet)
-
aggregate
@GET @Path("{aggr: \\s*(\\w(?:\\w|-)*)\\((.*)\\)}") @Produces({"application/json","application/xml","text/plain"}) public javax.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 javax.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 javax.ws.rs.core.Response delete()
Remove the entries.- Returns:
- response with a status of 200 (OK)
-
values
protected Collection values()
Get the entries' values.- Returns:
- entries' values
-
remove
protected void remove()
Remove the entries from the cache.
-
-