Tabnine Logo
MonKey
Code IndexAdd Tabnine to your IDE (free)

How to use
MonKey
in
com.jamonapi

Best Java code snippets using com.jamonapi.MonKey (Showing top 20 results out of 315)

origin: spring-projects/spring-framework

/**
 * Count the thrown exception and put the stack trace in the details portion of the key.
 * This will allow the stack trace to be viewed in the JAMon web application.
 */
protected void trackException(MonKey key, Throwable ex) {
  String stackTrace = "stackTrace=" + Misc.getExceptionTrace(ex);
  key.setDetails(stackTrace);
  // Specific exception counter. Example: java.lang.RuntimeException
  MonitorFactory.add(new MonKeyImp(ex.getClass().getName(), stackTrace, "Exception"), 1);
  // General exception counter which is a total for all exceptions thrown
  MonitorFactory.add(new MonKeyImp(MonitorFactory.EXCEPTIONS_LABEL, stackTrace, "Exception"), 1);
}
origin: stevensouza/jamonapi

private SQLDeArgMon appendDetails(String stackTrace) {
  if ("".equalsIgnoreCase(stackTrace))
    return this;
  Monitor[] monArr=monitors.getMonitors();
  StringBuilder sb=new StringBuilder();
  sb.append(monArr[0].getMonKey().getDetails()).append("\n").append(stackTrace);
  for (int i=0;i<monArr.length;i++) {
    Monitor mon=monArr[i];
    mon.getMonKey().setDetails(sb.toString());
  }
  return this;
}
origin: com.jamonapi/com.springsource.com.jamonapi

/** Returns the label for the monitor */
public String getLabel() {
  return (String) getMonKey().getValue(MonKey.LABEL_HEADER);
}
origin: stevensouza/jamonapi

/**
 *
 * @return A collection of all the unit types that are currently in this object (i.e. ms., ns., Exception,...)
 * @since  2.81
 */
public Collection<String> getDistinctUnits() {
  Set<String> units = new TreeSet<String>();
  int size=monitors.length;
  for (int i=0;i<size;i++) {
    units.add(monitors[i].getMonKey().getRangeKey());
  }
  return units;
}
origin: stevensouza/jamonapi

private MonitorImp createMon(MonKey key, boolean isPrimary, boolean isTimeMonitor)  {
  ActivityStats activityStats=new ActivityStats(new Counter(), primaryActive, allActive);
  // get default range for this type and assign it to the monitor
  RangeImp range=rangeFactory.getRangeDefault(key.getRangeKey(), activityStats);
  MonitorImp mon=new MonitorImp(key, range, activityStats, isTimeMonitor);
  // activity tracking is off by default.
  if (isTotalKeySizeTrackingEnabled()) {
    incrementKeySize(key.getSize());
  }
  if (activityTracking) {
    mon.setActivityTracking(activityTracking);
  }
  mon.setPrimary(isPrimary);
  return mon;
}
origin: com.jamonapi/com.springsource.com.jamonapi

public List getRowDisplayData(List rowData) {
 monData.key.getRowDisplayData(rowData);
   getThisRowData(rowData);   
 
 if (monData.range!=null)       
  monData.range.getRowDisplayData(rowData);
 
 return rowData;
}    
 
origin: com.jamonapi/com.springsource.com.jamonapi

public List getDisplayHeader(List header) {
  monData.key.getDisplayHeader(header);
  getThisData(header);
    if (monData.range!=null)
    monData.range.getDisplayHeader(header);
  return header;
}

origin: com.jamonapi/com.springsource.com.jamonapi

 public List getHeader(List header) {
    monData.key.getHeader(header);
   getThisData(header);
   if (monData.range!=null)
   monData.range.getHeader(header);
  return header;
}    
 
origin: com.jamonapi/com.springsource.com.jamonapi

public List getBasicHeader(List header) {
  monData.key.getBasicHeader(header);
  getThisData(header);
  
  return header;
 }    
 
origin: com.jamonapi/com.springsource.com.jamonapi

public List getRowData(List rowData) {
 monData.key.getRowData(rowData);
 getThisRowData(rowData); 
 if (monData.range!=null)      
  monData.range.getRowData(rowData);
 
 return rowData;
 
}        
origin: com.jamonapi/com.springsource.com.jamonapi

public List getBasicRowData(List rowData) {
  monData.key.getBasicRowData(rowData);
  return getThisRowData(rowData);
}
 
origin: com.jamonapi/com.springsource.com.jamonapi

/** Returns the units for the monitor */
public String getUnits() {
  return (String) getMonKey().getValue(MonKey.UNITS_HEADER);
}
origin: com.jamonapi/com.springsource.com.jamonapi

private MonitorImp[] getMonitors(String units) {
  MonitorImp[] monitors=getMonitors();
  if (monitors==null || units==null)
   return null;
  else if ("AllMonitors".equalsIgnoreCase(units))
   return monitors;
  
  List rows=new ArrayList(500);
  
  int size=monitors.length;
  for (int i=0;i<size;i++) {
    // if units of range match units of this monitor then 
    if (units.equalsIgnoreCase(monitors[i].getMonKey().getRangeKey()))
     rows.add(monitors[i]);
  }
  
  if (rows.size()==0)
    return null;
  else
    return (MonitorImp[]) rows.toArray(new MonitorImp[0]);
  
}
 
origin: stevensouza/jamonapi

public List getRowDisplayData(List rowData) {
  monData.key.getRowDisplayData(rowData);
  getThisRowData(rowData);
  if (monData.range!=null)
    monData.range.getRowDisplayData(rowData);
  return rowData;
}
origin: stevensouza/jamonapi

public List getDisplayHeader(List header) {
  monData.key.getDisplayHeader(header);
  getThisData(header);
  if (monData.range!=null)
    monData.range.getDisplayHeader(header);
  return header;
}
origin: stevensouza/jamonapi

public List getHeader(List header) {
  monData.key.getHeader(header);
  getThisData(header);
  if (monData.range!=null)
    monData.range.getHeader(header);
  return header;
}
origin: stevensouza/jamonapi

public List getBasicHeader(List header) {
  monData.key.getBasicHeader(header);
  getThisData(header);
  return header;
}
origin: stevensouza/jamonapi

public List getRowData(List rowData) {
  monData.key.getRowData(rowData);
  getThisRowData(rowData);
  if (monData.range!=null)
    monData.range.getRowData(rowData);
  return rowData;
}
origin: stevensouza/jamonapi

public List getBasicRowData(List rowData) {
  monData.key.getBasicRowData(rowData);
  return getThisRowData(rowData);
}
origin: stevensouza/jamonapi

private void changeDetails() {
  int len=(timeMons==null) ? 0 : timeMons.length;
  for (int i=0;i<len;i++)
    timeMons[i].getMonKey().setDetails( getDetailLabel());
}
com.jamonapiMonKey

Javadoc

Key that allows for a monitor to be passed any number of keys used in the equivalent of a group by clause. Put in hashmap to identify a Monitor. Implementations will need to implement equals, and hashcode. MonKeys are the way Monitors are identified in the storing Map

Most used methods

  • setDetails
  • getValue
    return any value associated with the key. new MonKey(label, units). would return the value associate
  • getBasicHeader
  • getBasicRowData
  • getDisplayHeader
  • getHeader
  • getRangeKey
    Uses this value to look up an associated Range
  • getRowData
  • getRowDisplayData
  • getDetailLabel
  • getDetails
  • getSize
    Returns the size of the key in characters within the key. Note it doesn't calculate the actual memor
  • getDetails,
  • getSize,
  • setInstanceName

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ImageIO (javax.imageio)
  • JTextField (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now