public class EntrySetResource extends Object
Modifier and Type | Field and 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 and Description |
---|
EntrySetResource(NamedCache cache,
Set setKeys,
Class clzValue)
Construct an EntrySetResource.
|
Modifier and Type | Method and 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.
|
protected NamedCache m_cache
protected Set m_setKeys
protected Class m_clzValue
@Inject protected AggregatorRegistry m_aggregatorRegistry
@Inject protected ProcessorRegistry m_processorRegistry
public EntrySetResource(NamedCache cache, Set setKeys, Class clzValue)
cache
- cache that stores the referenced entriessetKeys
- keys of the referenced entriesclzValue
- class of the referenced entries' values@GET @Produces(value={"application/json","application/xml","application/octet-stream"}) public javax.ws.rs.core.Response getValues(@MatrixParam(value="p") PropertySet propertySet)
propertySet
- properties to return (if null, values will be
returned)@GET @Path(value="entries") @Produces(value={"application/json","application/xml","text/plain"}) public javax.ws.rs.core.Response getEntries(@MatrixParam(value="p") PropertySet propertySet)
@GET @Path(value="{aggr: \\s*(\\w(?:\\w|-)*)\\((.*)\\)}") @Produces(value={"application/json","application/xml","text/plain"}) public javax.ws.rs.core.Response aggregate(@PathParam(value="aggr") String sAggr)
sAggr
- name of the aggregator@POST @Path(value="{proc: \\s*(\\w(?:\\w|-)*)\\((.*)\\)}") @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response process(@PathParam(value="proc") String sProc)
sProc
- name of the processor@DELETE public javax.ws.rs.core.Response delete()
protected Collection values()
protected void remove()