/**
  * Stops execution of all the continuous queries for this client to become inactive. This is
  * useful when client needs to control the incoming cq messages during bulk region operations.
  *
  * @see QueryService#executeCqs()
  * @throws CqException if failure to execute CQ.
  */
 public void stopCqs() throws CqException {
   try {
     getCqService().stopAllClientCqs();
   } catch (CqException cqe) {
     if (logger.isDebugEnabled()) {
       logger.debug("Unable to stop all CQs. Error :{}", cqe.getMessage(), cqe);
     }
   }
 }
 /**
  * Starts execution of all the registered continuous queries for this client. This is
  * complementary to stopCqs.
  *
  * @see QueryService#stopCqs()
  * @throws CqException if failure to execute CQ.
  */
 public void executeCqs() throws CqException {
   try {
     getCqService().executeAllClientCqs();
   } catch (CqException cqe) {
     if (logger.isDebugEnabled()) {
       logger.debug("Unable to execute all cqs. Error :{}", cqe.getMessage(), cqe);
     }
   }
 }
 /**
  * Close all CQs executing in this VM, and release resources associated with executing CQs.
  * CqQuerys created by other VMs are unaffected.
  */
 public void closeCqs() {
   try {
     getCqService().closeAllCqs(true);
   } catch (CqException cqe) {
     if (logger.isDebugEnabled()) {
       logger.debug("Unable to closeAll Cqs. Error :{}", cqe.getMessage(), cqe);
     }
   }
 }
 /**
  * Stops execution of all the continuous queries registered on the specified region for this
  * client. This is useful when client needs to control the incoming cq messages during bulk region
  * operations.
  *
  * @see QueryService#executeCqs()
  * @throws CqException if failure to execute CQs.
  */
 public void stopCqs(String regionName) throws CqException {
   try {
     getCqService().stopAllRegionCqs(regionName);
   } catch (CqException cqe) {
     if (logger.isDebugEnabled()) {
       logger.debug(
           "Unable to stop cqs on the specified region. Error :{}", cqe.getMessage(), cqe);
     }
   }
 }
 /**
  * Get statistics information for this query.
  *
  * @return CQ statistics null if the continuous query object not found for the given cqName.
  */
 public CqServiceStatistics getCqStatistics() {
   CqServiceStatistics stats = null;
   try {
     stats = getCqService().getCqStatistics();
   } catch (CqException cqe) {
     if (logger.isDebugEnabled()) {
       logger.debug("Unable get CQ Statistics. Error :{}", cqe.getMessage(), cqe);
     }
   }
   return stats;
 }
 /**
  * Retrieve all CqQuerys created by this VM.
  *
  * @return null if there are no cqs.
  */
 public CqQuery[] getCqs() {
   CqQuery[] cqs = null;
   try {
     return toArray(getCqService().getAllCqs());
   } catch (CqException cqe) {
     if (logger.isDebugEnabled()) {
       logger.debug("Unable to getAllCqs. Error :{}", cqe.getMessage(), cqe);
     }
   }
   return cqs;
 }
 /**
  * Retrieve a CqQuery by name.
  *
  * @return the CqQuery or null if not found
  */
 public CqQuery getCq(String cqName) {
   CqQuery cq = null;
   try {
     cq = (CqQuery) getCqService().getCq(cqName);
   } catch (CqException cqe) {
     if (logger.isDebugEnabled()) {
       logger.debug("Unable to getCq. Error :{}", cqe.getMessage(), cqe);
     }
   }
   return cq;
 }