Codota Logo
Configure.getInstance
Code IndexAdd Codota to your IDE (free)

How to use
getInstance
method
in
scouter.agent.Configure

Best Java code snippets using scouter.agent.Configure.getInstance (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: scouter-project/scouter

private String getDataSourceType() {
  if (Configure.getInstance().obj_type_inherit_to_child_enabled) {
    return Configure.getInstance().obj_type + "_ds";
  }
  return CounterConstants.DATASOURCE;
}
private void add(String objName, ObjectName mbean, String type, byte decimal, String attrName, String counterName) {
origin: scouter-project/scouter

private void setTarget() {
  Configure conf = Configure.getInstance();
  String host = conf.net_collector_ip;
  int port = conf.net_collector_udp_port;
  try {
    server_host = InetAddress.getByName(host);
    server_port = port;
  } catch (Exception e) {
    e.printStackTrace();
  }
}
protected void close(DatagramSocket d) {
origin: scouter-project/scouter

public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
  if (Configure.getInstance()._hook_dbconn_enabled == false) {
    return cv;
  }
  if (target.contains(className)) {
    return new InitialContextCV(cv, className);
  }
  return cv;
}
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_socket_enabled == false) {
      return cv;
    }
    HookingSet mset = reserved.get(className);
    if (mset != null){			
      return new SocketCV(cv, mset, className);
    }
    return cv;
  }
}
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_dbconn_enabled == false) {
      return cv;
    }
    HookingSet mset = reserved.get(className);
    if (mset != null){
      return new JDBCDriverCV(cv, mset, className);
    }

    return cv;
  }
}
origin: scouter-project/scouter

  @Override
  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_apicall_enabled == false) {
      return cv;
    }

    HookingSet mset = reserved.get(className);
    if (mset != null)
      return new RestTemplateResponseHandlerCV(cv, mset, className);
    return cv;
  }
}
origin: scouter-project/scouter

  public static void put(Object ds) {
    String old = ctxSet.put(ds.getClass().getName());
    if (old == null && Configure.getInstance()._log_datasource_lookup_enabled) {
      Logger.println("DataSource lookup : " + ds.getClass().getName());
    }
  }
}
origin: scouter-project/scouter

public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
  if (Configure.getInstance()._hook_cap_enabled == false) {
    return cv;
  }
  for (int i = 0; i < target.size(); i++) {
    HookingSet mset = target.get(i);
    if (mset.classMatch.include(className)) {
      return new CapReturnCV(cv, mset, className);
    }
  }
  return cv;
}
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_dbsql_enabled == false) {
      return cv;
    }
    if (target.contains(className) == false) {
      return cv;
    }
    Logger.println("A108", "jdbc stmt found: " + className);
    return new StatementCV(cv);
  }
}
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_dbsql_enabled == false) {
      return cv;
    }
    if (target.contains(className) == false) {
      return cv;
    }
    Logger.println("A106", "jdbc pstmt found: " + className);
    return new PreparedStatementCV(cv, noField);
  }
}
origin: scouter-project/scouter

private static boolean checkOk(String id, int sec) {
  if (Configure.getInstance().isIgnoreLog(id))
    return false;
  if (sec > 0) {
    long last = lastLog.get(id);
    long now = System.currentTimeMillis();
    if (now < last + sec * 1000)
      return false;
    lastLog.put(id, now);
  }
  return true;
}
origin: scouter-project/scouter

public void run() {
  while (true) {
    try {
      File root = Configure.getInstance().plugin_dir;
      reloadIfModified(root);
    } catch (Throwable t) {
      Logger.println("A160", t.toString());
    }
    ThreadUtil.sleep(5000);
  }
}
private void reloadIfModified(File root) {
origin: scouter-project/scouter

@RequestHandler(RequestCmd.SET_CONFIGURE_WAS)
public Pack setAgentConfigure(Pack param) {
  final String setConfig = ((MapPack) param).getText("setConfig");
  boolean success = Configure.getInstance().saveText(setConfig);
  if (success) {
    Configure.getInstance().reload(true);
  }
  MapPack p = new MapPack();
  p.put("result", String.valueOf(success));
  return p;
}

origin: scouter-project/scouter

@RequestHandler(RequestCmd.GET_CONFIGURE_WAS)
public Pack getAgentConfigure(Pack param) {
  MapPack p = new MapPack();
  
  p.put("configKey", Configure.getInstance().getKeyValueInfo().getList("key"));
  
  String config = Configure.getInstance().loadText();
  if (config == null) {
    //config = getEmptyConfiguration();
    config = "";
  }
  p.put("agentConfig", config);
  return p;
}
origin: scouter-project/scouter

@RequestHandler(RequestCmd.GET_CONFIGURE_WAS)
public Pack getAgentConfigure(Pack param) {
  MapPack p = new MapPack();
  
  p.put("configKey", Configure.getInstance().getKeyValueInfo().getList("key"));
  
  String config = Configure.getInstance().loadText();
  if (config == null) {
    //config = getEmptyConfiguration();
    config = "";
  }
  p.put("agentConfig", config);
  return p;
}
origin: scouter-project/scouter

@Counter
public void process(CounterBasket pw) {
  try {
    if (Configure.getInstance().counter_netstat_enabled) {
      netstat();
    }
    domain(pw);
  } catch (Exception e) {
    Logger.println("A140", 10, "HostPerf", e);
  }
}
origin: scouter-project/scouter

@RequestHandler(RequestCmd.CONFIGURE_DESC)
public Pack getConfigureDesc(Pack param) {
  StringKeyLinkedMap<String> descMap = Configure.getInstance().getConfigureDesc();
  MapPack pack = new MapPack();
  Enumeration<StringKeyLinkedEntry<String>> entries = descMap.entries();
  while (entries.hasMoreElements()) {
    StringKeyLinkedEntry<String> entry = entries.nextElement();
    pack.put(entry.getKey(), entry.getValue());
  }
  return pack;
}
origin: scouter-project/scouter

  @RequestHandler(RequestCmd.CONFIGURE_VALUE_TYPE)
  public Pack getConfigureValueType(Pack param) {
    StringKeyLinkedMap<ValueType> valueTypeMap = Configure.getInstance().getConfigureValueType();
    MapPack pack = new MapPack();
    Enumeration<StringKeyLinkedEntry<ValueType>> entries = valueTypeMap.entries();
    while (entries.hasMoreElements()) {
      StringKeyLinkedEntry<ValueType> entry = entries.nextElement();
      pack.put(entry.getKey(), entry.getValue().getType());
    }
    return pack;
  }
}
origin: scouter-project/scouter

  @RequestHandler(RequestCmd.CONFIGURE_VALUE_TYPE)
  public Pack getConfigureValueType(Pack param) {
    StringKeyLinkedMap<ValueType> valueTypeMap = Configure.getInstance().getConfigureValueType();
    MapPack pack = new MapPack();
    Enumeration<StringKeyLinkedEntry<ValueType>> entries = valueTypeMap.entries();
    while (entries.hasMoreElements()) {
      StringKeyLinkedEntry<ValueType> entry = entries.nextElement();
      pack.put(entry.getKey(), entry.getValue().getType());
    }
    return pack;
  }
}
origin: scouter-project/scouter

@RequestHandler(RequestCmd.LIST_CONFIGURE_WAS)
public Pack listConfigure(Pack param) {
  MapValue m = Configure.getInstance().getKeyValueInfo();
  MapPack pack = new MapPack();
  pack.put("key", m.getList("key"));
  pack.put("value", m.getList("value"));
  pack.put("default", m.getList("default"));
  return pack;
}
scouter.agentConfiguregetInstance

Popular methods of Configure

  • <init>
  • apply
  • getBoolean
  • getConfigureDesc
  • getConfigureValueType
  • getInt
  • getKeyValueInfo
  • getLong
  • getObjDetectedType
  • getObjHash
  • getObjName
  • getPropertyFile
  • getObjName,
  • getPropertyFile,
  • getStringSet,
  • getValue,
  • loadText,
  • printConfig,
  • reload,
  • resetObjInfo,
  • saveText

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now