public class CqServiceImpl
extends java.lang.Object
implements org.apache.geode.cache.query.internal.cq.CqService
| Modifier and Type | Field and Description |
|---|---|
static boolean |
EXECUTE_QUERY_DURING_INIT
System property to evaluate the query even though the initial results are not required when cq
is executed using the execute() method.
|
| Constructor and Description |
|---|
CqServiceImpl(org.apache.geode.internal.cache.InternalCache cache)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Cleans up the CqService.
|
void |
closeAllCqs(boolean clientInitiated) |
void |
closeAllCqs(boolean clientInitiated,
java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> cqs,
boolean keepAlive) |
void |
closeClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId) |
void |
closeCq(java.lang.String cqName,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId) |
void |
closeCqs(java.lang.String regionName) |
void |
closeNonDurableClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId)
Server side method.
|
java.lang.String |
constructServerCqName(java.lang.String cqName,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId) |
void |
cqsConnected(org.apache.geode.cache.client.Pool pool) |
void |
cqsDisconnected(org.apache.geode.cache.client.Pool pool) |
void |
dispatchCqListeners(java.util.HashMap<java.lang.String,java.lang.Integer> cqs,
int messageType,
java.lang.Object key,
java.lang.Object value,
byte[] delta,
org.apache.geode.cache.client.internal.QueueManager qManager,
org.apache.geode.internal.cache.EventID eventId) |
void |
executeAllClientCqs() |
void |
executeAllRegionCqs(java.lang.String regionName) |
org.apache.geode.cache.query.internal.cq.ServerCQ |
executeCq(java.lang.String cqName,
java.lang.String queryString,
int cqState,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId,
org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier ccn,
boolean isDurable,
boolean manageEmptyRegions,
int regionDataPolicy,
java.util.Map emptyRegionsMap)
Executes the given CqQuery, if the CqQuery for that name is not there it registers the one and
executes.
|
void |
executeCqs(java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> cqs) |
java.util.List<org.apache.geode.cache.query.internal.cq.ServerCQ> |
getAllClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId) |
java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> |
getAllCqs() |
java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> |
getAllCqs(java.lang.String regionName) |
java.util.List<java.lang.String> |
getAllDurableClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId) |
java.util.List<java.lang.String> |
getAllDurableCqsFromServer(org.apache.geode.cache.client.internal.InternalPool pool) |
org.apache.geode.cache.Cache |
getCache()
Returns the cache associated with the cqService.
|
org.apache.geode.cache.query.CqQuery |
getClientCqFromServer(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId,
java.lang.String clientCqName) |
org.apache.geode.cache.query.internal.cq.InternalCqQuery |
getCq(java.lang.String cqName) |
CqServiceVsdStats |
getCqServiceVsdStats()
Get the VSD ststs for CQ Service.
|
org.apache.geode.cache.query.CqServiceStatistics |
getCqStatistics() |
org.apache.geode.internal.cache.InternalCache |
getInternalCache() |
java.util.Map<java.lang.String,java.util.HashSet<java.lang.String>> |
getMatchingCqMap()
Returns the matching CQ map.
|
org.apache.geode.cache.client.internal.UserAttributes |
getUserAttributes(java.lang.String cqName) |
boolean |
isRunning() |
boolean |
isServer()
Is the CQ service in a cache server environment
|
org.apache.geode.cache.query.internal.cq.ClientCQ |
newCq(java.lang.String cqName,
java.lang.String queryString,
org.apache.geode.cache.query.CqAttributes cqAttributes,
org.apache.geode.cache.client.internal.InternalPool pool,
boolean isDurable) |
void |
processEvents(org.apache.geode.cache.CacheEvent event,
org.apache.geode.distributed.internal.DistributionAdvisor.Profile localProfile,
org.apache.geode.distributed.internal.DistributionAdvisor.Profile[] profiles,
org.apache.geode.internal.cache.FilterRoutingInfo frInfo) |
void |
resumeCQ(int cqState,
org.apache.geode.cache.query.internal.cq.ServerCQ cQuery) |
void |
start() |
CqServiceVsdStats |
stats() |
void |
stopAllClientCqs() |
void |
stopAllRegionCqs(java.lang.String regionName) |
void |
stopCq(java.lang.String cqName,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientId)
Called directly on server side.
|
void |
stopCqs(java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> cqs) |
public static boolean EXECUTE_QUERY_DURING_INIT
public CqServiceImpl(org.apache.geode.internal.cache.InternalCache cache)
cache - The cache used for the servicepublic org.apache.geode.cache.Cache getCache()
public org.apache.geode.internal.cache.InternalCache getInternalCache()
public CqServiceVsdStats stats()
public org.apache.geode.cache.query.internal.cq.ClientCQ newCq(java.lang.String cqName,
java.lang.String queryString,
org.apache.geode.cache.query.CqAttributes cqAttributes,
org.apache.geode.cache.client.internal.InternalPool pool,
boolean isDurable)
throws org.apache.geode.cache.query.QueryInvalidException,
org.apache.geode.cache.query.CqExistsException,
org.apache.geode.cache.query.CqException
newCq in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.QueryInvalidExceptionorg.apache.geode.cache.query.CqExistsExceptionorg.apache.geode.cache.query.CqExceptionpublic org.apache.geode.cache.query.internal.cq.ServerCQ executeCq(java.lang.String cqName,
java.lang.String queryString,
int cqState,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId,
org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier ccn,
boolean isDurable,
boolean manageEmptyRegions,
int regionDataPolicy,
java.util.Map emptyRegionsMap)
throws org.apache.geode.cache.query.CqException,
org.apache.geode.cache.query.RegionNotFoundException,
org.apache.geode.cache.query.CqClosedException
executeCq in interface org.apache.geode.cache.query.internal.cq.CqServicemanageEmptyRegions - whether to update the 6.1 emptyRegions map held in the CCNregionDataPolicy - the data policy of the region associated with the query. This is only
needed if manageEmptyRegions is true.emptyRegionsMap - map of empty regions.java.lang.IllegalStateException - if this is called at client side.org.apache.geode.cache.query.CqExceptionorg.apache.geode.cache.query.RegionNotFoundExceptionorg.apache.geode.cache.query.CqClosedExceptionpublic void resumeCQ(int cqState,
org.apache.geode.cache.query.internal.cq.ServerCQ cQuery)
resumeCQ in interface org.apache.geode.cache.query.internal.cq.CqServicepublic org.apache.geode.cache.query.CqQuery getClientCqFromServer(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId,
java.lang.String clientCqName)
getClientCqFromServer in interface org.apache.geode.cache.query.internal.cq.CqServicepublic org.apache.geode.cache.query.internal.cq.InternalCqQuery getCq(java.lang.String cqName)
getCq in interface org.apache.geode.cache.query.internal.cq.CqServicepublic java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> getAllCqs()
getAllCqs in interface org.apache.geode.cache.query.internal.cq.CqServicepublic java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> getAllCqs(java.lang.String regionName)
throws org.apache.geode.cache.query.CqException
getAllCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void executeAllClientCqs()
throws org.apache.geode.cache.query.CqException
executeAllClientCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void executeAllRegionCqs(java.lang.String regionName)
throws org.apache.geode.cache.query.CqException
executeAllRegionCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void executeCqs(java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> cqs)
throws org.apache.geode.cache.query.CqException
executeCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void stopAllClientCqs()
throws org.apache.geode.cache.query.CqException
stopAllClientCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void stopAllRegionCqs(java.lang.String regionName)
throws org.apache.geode.cache.query.CqException
stopAllRegionCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void stopCqs(java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> cqs)
throws org.apache.geode.cache.query.CqException
stopCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void closeCqs(java.lang.String regionName)
throws org.apache.geode.cache.query.CqException
closeCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void stopCq(java.lang.String cqName,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientId)
throws org.apache.geode.cache.query.CqException
stopCq in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void closeCq(java.lang.String cqName,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId)
throws org.apache.geode.cache.query.CqException
closeCq in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void closeAllCqs(boolean clientInitiated)
closeAllCqs in interface org.apache.geode.cache.query.internal.cq.CqServicepublic void closeAllCqs(boolean clientInitiated,
java.util.Collection<? extends org.apache.geode.cache.query.internal.cq.InternalCqQuery> cqs,
boolean keepAlive)
closeAllCqs in interface org.apache.geode.cache.query.internal.cq.CqServicepublic org.apache.geode.cache.query.CqServiceStatistics getCqStatistics()
getCqStatistics in interface org.apache.geode.cache.query.internal.cq.CqServicepublic void closeClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId)
throws org.apache.geode.cache.query.CqException
closeClientCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic java.util.List<org.apache.geode.cache.query.internal.cq.ServerCQ> getAllClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId)
getAllClientCqs in interface org.apache.geode.cache.query.internal.cq.CqServicepublic java.util.List<java.lang.String> getAllDurableClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId)
throws org.apache.geode.cache.query.CqException
getAllDurableClientCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic void closeNonDurableClientCqs(org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId)
throws org.apache.geode.cache.query.CqException
closeNonDurableClientCqs in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic boolean isServer()
public void close()
close in interface org.apache.geode.cache.query.internal.cq.CqServicepublic boolean isRunning()
isRunning in interface org.apache.geode.cache.query.internal.cq.CqServicepublic void start()
start in interface org.apache.geode.cache.query.internal.cq.CqServicepublic java.lang.String constructServerCqName(java.lang.String cqName,
org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID clientProxyId)
constructServerCqName in interface org.apache.geode.cache.query.internal.cq.CqServicepublic void dispatchCqListeners(java.util.HashMap<java.lang.String,java.lang.Integer> cqs,
int messageType,
java.lang.Object key,
java.lang.Object value,
byte[] delta,
org.apache.geode.cache.client.internal.QueueManager qManager,
org.apache.geode.internal.cache.EventID eventId)
dispatchCqListeners in interface org.apache.geode.cache.query.internal.cq.CqServicepublic void processEvents(org.apache.geode.cache.CacheEvent event,
org.apache.geode.distributed.internal.DistributionAdvisor.Profile localProfile,
org.apache.geode.distributed.internal.DistributionAdvisor.Profile[] profiles,
org.apache.geode.internal.cache.FilterRoutingInfo frInfo)
throws org.apache.geode.cache.query.CqException
processEvents in interface org.apache.geode.cache.query.internal.cq.CqServiceorg.apache.geode.cache.query.CqExceptionpublic CqServiceVsdStats getCqServiceVsdStats()
public java.util.Map<java.lang.String,java.util.HashSet<java.lang.String>> getMatchingCqMap()
public org.apache.geode.cache.client.internal.UserAttributes getUserAttributes(java.lang.String cqName)
getUserAttributes in interface org.apache.geode.cache.query.internal.cq.CqServicepublic void cqsDisconnected(org.apache.geode.cache.client.Pool pool)
cqsDisconnected in interface org.apache.geode.cache.query.internal.cq.CqServicepublic void cqsConnected(org.apache.geode.cache.client.Pool pool)
cqsConnected in interface org.apache.geode.cache.query.internal.cq.CqServicepublic java.util.List<java.lang.String> getAllDurableCqsFromServer(org.apache.geode.cache.client.internal.InternalPool pool)
getAllDurableCqsFromServer in interface org.apache.geode.cache.query.internal.cq.CqService