Package org.jmule.core.statistics

Examples of org.jmule.core.statistics.JMuleCoreStatsProvider


      return;
    }

    Set<String> types = new HashSet<String>();
    types.add(JMuleCoreStats.SEARCHES_COUNT);
    JMuleCoreStats.registerProvider(types, new JMuleCoreStatsProvider() {
      public void updateStats(Set<String> types,
          Map<String, Object> values) {
        if (types.contains(JMuleCoreStats.SEARCHES_COUNT)) {
          values.put(JMuleCoreStats.SEARCHES_COUNT, searches_count);
        }
View Full Code Here


      e.printStackTrace();
      return;
    }
    Set<String> types = new HashSet<String>()
       types.add(JMuleCoreStats.ST_NET_PEERS_COUNT);
       JMuleCoreStats.registerProvider(types, new JMuleCoreStatsProvider() {
      public void updateStats(Set<String> types, Map<String, Object> values) {
        if (types.contains(JMuleCoreStats.ST_NET_PEERS_COUNT)) {
          values.put(JMuleCoreStats.ST_NET_PEERS_COUNT, peers.size());
        }
      }
View Full Code Here

    types.add(JMuleCoreStats.ST_DISK_SHARED_FILES_COMPLETE_COUNT);
    types.add(JMuleCoreStats.ST_DISK_SHARED_FILES_BYTES);
    types.add(JMuleCoreStats.ST_DISK_SHARED_FILES_PARTIAL_BYTES);
    types.add(JMuleCoreStats.ST_DISK_SHARED_FILES_COMPLETE_BYTES);

    JMuleCoreStats.registerProvider(types, new JMuleCoreStatsProvider() {
      public void updateStats(Set<String> types,
          Map<String, Object> values) {
        if (types.contains(JMuleCoreStats.ST_DISK_SHARED_FILES_COUNT))
          values.put(JMuleCoreStats.ST_DISK_SHARED_FILES_COUNT,
              sharedFiles.size());
View Full Code Here

   
      Set<String> types = new HashSet<String>();
    types.add(JMuleCoreStats.ST_NET_SESSION_UPLOAD_BYTES);
    types.add(JMuleCoreStats.ST_NET_SESSION_UPLOAD_COUNT);
    types.add(JMuleCoreStats.ST_NET_PEERS_UPLOAD_COUNT);
    JMuleCoreStats.registerProvider(types, new JMuleCoreStatsProvider() {
           public void updateStats(Set<String> types, Map<String, Object> values) {
                 if(types.contains(JMuleCoreStats.ST_NET_SESSION_UPLOAD_BYTES)) {
                   long total_uploaded_bytes = 0;
                 for(UploadSession session : session_list.values()) {
                   total_uploaded_bytes+=session.getTransferredBytes();
View Full Code Here

    Set<String> types = new HashSet<String>();
    types.add(JMuleCoreStats.ST_NET_SESSION_DOWNLOAD_BYTES);
    types.add(JMuleCoreStats.ST_NET_SESSION_DOWNLOAD_COUNT);
    types.add(JMuleCoreStats.ST_NET_PEERS_DOWNLOAD_COUNT);
    JMuleCoreStats.registerProvider(types, new JMuleCoreStatsProvider() {
      public void updateStats(Set<String> types,
          Map<String, Object> values) {
        if (types
            .contains(JMuleCoreStats.ST_NET_SESSION_DOWNLOAD_BYTES)) {
          long total_downloaded_bytes = 0;
View Full Code Here

    Set<String> types = new HashSet<String>();
    types.add(JMuleCoreStats.ST_NET_SERVERS_COUNT);
    types.add(JMuleCoreStats.ST_NET_SERVERS_DEAD_COUNT);
    types.add(JMuleCoreStats.ST_NET_SERVERS_ALIVE_COUNT);
   
    JMuleCoreStats.registerProvider(types, new JMuleCoreStatsProvider() {
      public void updateStats(Set<String> types,Map<String, Object> values) {
        if (types.contains(JMuleCoreStats.ST_NET_SERVERS_COUNT)) {
          values.put(JMuleCoreStats.ST_NET_SERVERS_COUNT, getServersCount());
        }
        if (types.contains(JMuleCoreStats.ST_NET_SERVERS_DEAD_COUNT)) {
View Full Code Here

TOP

Related Classes of org.jmule.core.statistics.JMuleCoreStatsProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.