[infinispan-issues] [JBoss JIRA] Resolved: (ISPN-900) RemoteCache should implement size() and isEmpty()

Manik Surtani (JIRA) jira-events at lists.jboss.org
Thu Jan 27 05:12:49 EST 2011


     [ https://issues.jboss.org/browse/ISPN-900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manik Surtani resolved ISPN-900.
--------------------------------

    Resolution: Done


> RemoteCache should implement size() and isEmpty()
> -------------------------------------------------
>
>                 Key: ISPN-900
>                 URL: https://issues.jboss.org/browse/ISPN-900
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Cache Server
>            Reporter: Galder Zamarreño
>            Assignee: Galder Zamarreño
>              Labels: hotrod
>             Fix For: 4.2.1.Final, 5.0.0.BETA1
>
>
> 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;
>    }

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the infinispan-issues mailing list