bundles/org.eclipse.packagedrone.repo.channel.impl/src/org/eclipse/packagedrone/repo/channel/impl/ChannelServiceImpl.java
@Override
    public ChannelStatistics getStatistics ()
    {
        final ChannelStatistics cs = new ChannelStatistics ();

        try ( Locked l = lock ( this.readLock ) )
        {
            final Collection<ChannelInformation> cis = list ();

            cs.setTotalNumberOfArtifacts ( cis.stream ().mapToLong ( ci -> ci.getState ().getNumberOfArtifacts () ).sum () );
            cs.setTotalNumberOfBytes ( cis.stream ().mapToLong ( ci -> ci.getState ().getNumberOfBytes () ).sum () );
        }

        return cs;
    }
@Override
    public ChannelStatistics getStatistics ()
    {
        final ChannelStatistics cs = new ChannelStatistics ();

        try ( Locked l = lock ( this.readLock ) )
        {
            final Collection<ChannelInformation> cis = list ();

            cs.setTotalNumberOfArtifacts ( cis.stream ().mapToLong ( ci -> ci.getState ().getNumberOfArtifacts () ).sum () );
            cs.setTotalNumberOfBytes ( cis.stream ().mapToLong ( ci -> ci.getState ().getNumberOfBytes () ).sum () );
        }

        return cs;
    }
@ Override public ChannelStatistics getStatistics ( ) { final ChannelStatistics cs = new ChannelStatistics ( ) ; try ( Locked l = lock ( this . readLock ) ) { final Collection < ChannelInformation > cis = list ( ) ; cs . setTotalNumberOfArtifacts ( cis . stream ( ) . mapToLong ( ci -> ci . getState ( ) . getNumberOfArtifacts ( ) ) . sum ( ) ) ; cs . setTotalNumberOfBytes ( cis . stream ( ) . mapToLong ( ci -> ci . getState ( ) . getNumberOfBytes ( ) ) . sum ( ) ) ; } return cs ; }
statistics
statistics