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

Galder Zamarreño (JIRA) jira-events at lists.jboss.org
Mon Feb 14 13:05:13 EST 2011


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

Galder Zamarreño updated ISPN-900:
----------------------------------

    Fix Version/s: 4.2.1.CR2
                   5.0.0.ALPHA3
                       (was: 5.0.0.BETA1)


> 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.CR2, 4.2.1.Final, 5.0.0.ALPHA3
>
>
> 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