Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-900

RemoteCache should implement size() and isEmpty()

XMLWordPrintable

    • Low

      It's dead easy to do this by simply checking the stats returned by the server, i.e.

      @Override
      public int size()

      { assertRemoteCacheManagerIsStarted(); StatsOperation op = operationsFactory.newStatsOperation(); return Integer.parseInt(((Map<String, String>) op.execute()).get(ServerStatistics.CURRENT_NR_OF_ENTRIES)); }

      @Override
      public boolean isEmpty()

      { return size() == 0; }

              rh-ee-galder Galder ZamarreƱo
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: