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 Details

    • 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 Details

    • EntrySetResource

      public EntrySetResource(NamedCache cache, Set setKeys, Class clzValue)
      Construct an EntrySetResource.
      Parameters:
      cache - cache that stores the referenced entries
      setKeys - keys of the referenced entries
      clzValue - 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

      protected Collection values()
      Get the entries' values.
      Returns:
      entries' values
    • remove

      protected void remove()
      Remove the entries from the cache.