Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.coherence.rest
Class NamedQueryResource

java.lang.Object
  extended by com.tangosol.coherence.rest.NamedQueryResource


public class NamedQueryResource
extends java.lang.Object

REST resource representing a set of filtered cache entries.

Author:
ic 2011.12.03

Field Summary
protected  NamedCache m_cache
          NamedCache wrapped by this resource.
protected  int m_cMaxResults
          Maximum size of the result set this resource is allowed to return.
protected  com.tangosol.coherence.rest.config.NamedQuery m_query
          Named query responsible to filter cache entries.
protected  QueryEngineRegistry m_registry
          Query engine registry.

 

Constructor Summary
NamedQueryResource(NamedCache cache, com.tangosol.coherence.rest.config.NamedQuery query, QueryEngineRegistry registry, int cMaxResults)
          Create a instance of NamedQueryResource.

 

Method Summary
 javax.ws.rs.core.Response aggregate(javax.ws.rs.core.UriInfo uriInfo, java.lang.String sAggr, AggregatorRegistry aggrRegistry)
          Perform an aggregating operation against the entries that belong to the named query.
 javax.ws.rs.core.Response get(javax.ws.rs.core.UriInfo uriInfo, int nStart, int cResults, java.lang.String sSort, com.tangosol.coherence.rest.util.PropertySet propertySet)
          Return the cache values that satisfy criteria defined by this resource.
 javax.ws.rs.core.Response getKeys(javax.ws.rs.core.UriInfo uriInfo)
          Return the keys for cache entries that satisfy criteria defined by this resource.
protected  java.util.Set keys(javax.ws.rs.core.UriInfo uriInfo)
          Return the keys of cache entries that satisfy the named query criteria.
 javax.ws.rs.core.Response process(javax.ws.rs.core.UriInfo uriInfo, java.lang.String sProc, ProcessorRegistry procRegistry)
          Invoke the specified processor against the entries that belong to the named query.
protected  java.util.Collection values(javax.ws.rs.core.UriInfo uriInfo, int nStart, int cResults, java.lang.String sSort)
          Return the cache values that satisfy the named query criteria.

 

Field Detail

m_cache

protected final NamedCache m_cache
NamedCache wrapped by this resource.

m_query

protected final com.tangosol.coherence.rest.config.NamedQuery m_query
Named query responsible to filter cache entries.

m_registry

protected final QueryEngineRegistry m_registry
Query engine registry.

m_cMaxResults

protected final int m_cMaxResults
Maximum size of the result set this resource is allowed to return.

Constructor Detail

NamedQueryResource

public NamedQueryResource(NamedCache cache,
                          com.tangosol.coherence.rest.config.NamedQuery query,
                          QueryEngineRegistry registry,
                          int cMaxResults)
Create a instance of NamedQueryResource.
Parameters:
cache - cache to create a resource for
query - query filtering the cache entries
registry - query engine registry, contains mappings between query engines name and QueryEngine instance
cMaxResults - max size of result set for this resource

Method Detail

aggregate

public javax.ws.rs.core.Response aggregate(@Context
                                           javax.ws.rs.core.UriInfo uriInfo,
                                           java.lang.String sAggr,
                                           AggregatorRegistry aggrRegistry)
Perform an aggregating operation against the entries that belong to the named query.
Parameters:
uriInfo - UriInfo for the invoked resource method
sAggr - name of the aggregator
aggrRegistry - aggregator registry that is used to map the given aggregator name to an EntryAggregator instance
Returns:
the result of the aggregation

process

public javax.ws.rs.core.Response process(@Context
                                         javax.ws.rs.core.UriInfo uriInfo,
                                         java.lang.String sProc,
                                         ProcessorRegistry procRegistry)
Invoke the specified processor against the entries that belong to the named query.
Parameters:
uriInfo - UriInfo for the invoked resource method
sProc - the name of the processor
procRegistry - processor registry that is used to map the given processor name to an the EntryProcessor instance
Returns:
a Map containing the results of invoking the EntryProcessor against the entries that are selected by the given query

get

public javax.ws.rs.core.Response get(@Context
                                     javax.ws.rs.core.UriInfo uriInfo,
                                     int nStart,
                                     int cResults,
                                     java.lang.String sSort,
                                     com.tangosol.coherence.rest.util.PropertySet propertySet)
Return the cache values that satisfy criteria defined by this resource.
Parameters:
uriInfo - UriInfo for the invoked resource method
nStart - starting index of result set to be returned
cResults - size of result set to be returned (page size)
sSort - a string expression that represents ordering
propertySet - properties to return (if null, values will be returned)
Returns:
values that satisfy criteria defined by this resource

getKeys

public javax.ws.rs.core.Response getKeys(@Context
                                         javax.ws.rs.core.UriInfo uriInfo)
Return the keys for cache entries that satisfy criteria defined by this resource.
Parameters:
uriInfo - UriInfo for the invoked resource method
Returns:
the keys of the cache entries satisfying criteria defined by this resource

values

protected java.util.Collection values(javax.ws.rs.core.UriInfo uriInfo,
                                      int nStart,
                                      int cResults,
                                      java.lang.String sSort)
Return the cache values that satisfy the named query criteria.
Parameters:
uriInfo - UriInfo for invoked resource method
nStart - starting index of result set to be returned
cResults - size of result set to be returned (page size)
sSort - a string expression that represents ordering
Returns:
filtered cache values

keys

protected java.util.Set keys(javax.ws.rs.core.UriInfo uriInfo)
Return the keys of cache entries that satisfy the named query criteria.
Parameters:
uriInfo - UriInfo for invoked resource method
Returns:
filtered key set

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.