Uploaded image for project: 'Hot Rod Native client'
  1. Hot Rod Native client
  2. HRCPP-381

Add continuous queries support

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Client will be able to receive events when changes occor on the resultset of the specified query. Three kind of events are available: JOINING, LEAVING and UPDATED.

      Setup will be as follow:

          ContinuousQueryListener<int, sample_bank_account::User> cql(testCache,"select id from sample_bank_account.User");
          std::function<void(int, sample_bank_account::User)> join = [](int k, sample_bank_account::User u) {
              std::cout << "JOINING: key="<< u.id() << " value="<< u.name() << std::endl;
          };
          std::function<void(int, sample_bank_account::User)> leave =[](int k, sample_bank_account::User u) {
              std::cout << "LEAVING: key="<< u.id() << " value="<< u.name() << std::endl;
          };
          std::function<void(int, sample_bank_account::User)> change =[](int k, sample_bank_account::User u) {
              std::cout << "CHANGING: key="<< u.id() << " value="<< u.name() << std::endl;
          };
      
          cql.setJoiningListener(join);
          cql.setLeavingListener(leave);
          cql.setUpdatedListener(change);
          testCache.addContinuousQueryListener(cql);
      

              vrigamon@redhat.com Vittorio Rigamonti
              vrigamon@redhat.com Vittorio Rigamonti
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: