src/share/classes/sun/management/snmp/jvminstr/JvmMemGCEntryImpl.java

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: otaviojava@java.net


  53      * identifies a Memory Manager."
  54      *
  55      */
  56     protected final int JvmMemManagerIndex;
  57 
  58     protected final GarbageCollectorMXBean gcm;
  59 
  60     /**
  61      * Constructor for the "JvmMemGCEntry" group.
  62      */
  63     public JvmMemGCEntryImpl(GarbageCollectorMXBean gcm, int index) {
  64         this.gcm=gcm;
  65         this.JvmMemManagerIndex = index;
  66     }
  67 
  68     /**
  69      * Getter for the "JvmMemGCTimeMs" variable.
  70      */
  71     // Don't bother to uses the request contextual cache for this.
  72     public Long getJvmMemGCTimeMs() throws SnmpStatusException {
  73         return new Long(gcm.getCollectionTime());
  74     }
  75 
  76     /**
  77      * Getter for the "JvmMemGCCount" variable.
  78      */
  79     // Don't bother to uses the request contextual cache for this.
  80     public Long getJvmMemGCCount() throws SnmpStatusException {
  81         return new Long(gcm.getCollectionCount());
  82     }
  83 
  84     /**
  85      * Getter for the "JvmMemManagerIndex" variable.
  86      */
  87     public Integer getJvmMemManagerIndex() throws SnmpStatusException {
  88         return new Integer(JvmMemManagerIndex);
  89     }
  90 
  91 }


  53      * identifies a Memory Manager."
  54      *
  55      */
  56     protected final int JvmMemManagerIndex;
  57 
  58     protected final GarbageCollectorMXBean gcm;
  59 
  60     /**
  61      * Constructor for the "JvmMemGCEntry" group.
  62      */
  63     public JvmMemGCEntryImpl(GarbageCollectorMXBean gcm, int index) {
  64         this.gcm=gcm;
  65         this.JvmMemManagerIndex = index;
  66     }
  67 
  68     /**
  69      * Getter for the "JvmMemGCTimeMs" variable.
  70      */
  71     // Don't bother to uses the request contextual cache for this.
  72     public Long getJvmMemGCTimeMs() throws SnmpStatusException {
  73         return gcm.getCollectionTime();
  74     }
  75 
  76     /**
  77      * Getter for the "JvmMemGCCount" variable.
  78      */
  79     // Don't bother to uses the request contextual cache for this.
  80     public Long getJvmMemGCCount() throws SnmpStatusException {
  81         return gcm.getCollectionCount();
  82     }
  83 
  84     /**
  85      * Getter for the "JvmMemManagerIndex" variable.
  86      */
  87     public Integer getJvmMemManagerIndex() throws SnmpStatusException {
  88         return new Integer(JvmMemManagerIndex);
  89     }
  90 
  91 }