Tabnine Logo
Configure.getValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getValue
method
in
scouter.agent.Configure

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

origin: scouter-project/scouter

public int getInt(String key, int def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Integer.parseInt(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public boolean getBoolean(String key, boolean def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Boolean.parseBoolean(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public long getLong(String key, long def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Long.parseLong(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public int getInt(String key, int def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Integer.parseInt(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public long getLong(String key, long def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Long.parseLong(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public long getLong(String key, long def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Long.parseLong(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public boolean getBoolean(String key, boolean def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Boolean.parseBoolean(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public int getInt(String key, int def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Integer.parseInt(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public boolean getBoolean(String key, boolean def) {
  try {
    String v = getValue(key);
    if (v != null)
      return Boolean.parseBoolean(v);
  } catch (Exception e) {
  }
  return def;
}
origin: scouter-project/scouter

public int getInt(String key, int def, int min) {
  try {
    String v = getValue(key);
    if (v != null) {
      return Math.max(Integer.parseInt(v), min);
    }
  } catch (Exception e) {
  }
  return Math.max(def, min);
}
origin: scouter-project/scouter

public int getInt(String key, int def, int min) {
  try {
    String v = getValue(key);
    if (v != null) {
      return Math.max(Integer.parseInt(v), min);
    }
  } catch (Exception e) {
  }
  return Math.max(def, min);
}
origin: scouter-project/scouter

public int getInt(String key, int def, int min) {
  try {
    String v = getValue(key);
    if (v != null) {
      return Math.max(Integer.parseInt(v), min);
    }
  } catch (Exception e) {
  }
  return Math.max(def, min);
}
origin: scouter-project/scouter

public synchronized void resetObjInfo() {
  String detected = CounterConstants.HOST;
  if (SystemUtil.IS_LINUX) {
    detected = CounterConstants.LINUX;
  } else if (SystemUtil.IS_WINDOWS) {
    detected = CounterConstants.WINDOWS;
  } else if (SystemUtil.IS_MAC_OSX) {
    detected = CounterConstants.OSX;
  } else if (SystemUtil.IS_AIX) {
    detected = CounterConstants.AIX;
  } else if (SystemUtil.IS_HP_UX) {
    detected = CounterConstants.HPUX;
  }
  this.objDetectedType = detected;
  this.monitoring_group_type = getValue("monitoring_group_type");
  this.obj_type = StringUtil.isEmpty(this.monitoring_group_type) ? getValue("obj_type", detected) : this.monitoring_group_type;
  this.obj_name = getValue("obj_name", SysJMX.getHostName());
  this.objName = "/" + this.obj_name;
  this.objHash = HashUtil.hash(objName);
}
origin: scouter-project/scouter

this.monitoring_group_type = getValue("monitoring_group_type");
this.obj_type = StringUtil.isEmpty(this.monitoring_group_type) ? getValue("obj_type", detected) : this.monitoring_group_type;
this.objExtType = ObjTypeDetector.objExtType;
  detected = CounterConstants.HPUX;
this.obj_host_type = getValue("obj_host_type", detected);
this.obj_host_name = getValue("obj_host_name", SysJMX.getHostName());
this.objHostName = "/" + this.obj_host_name;
this.objHostHash = HashUtil.hash(objHostName);
  defaultName = this.obj_type + "1";
this.obj_name = getValue("obj_name", System.getProperty("jvmRoute", defaultName));
this.objName = objHostName + "/" + this.obj_name;
this.objHash = HashUtil.hash(objName);
origin: scouter-project/scouter

this.monitoring_group_type = getValue("monitoring_group_type");
this.obj_type = StringUtil.isEmpty(this.monitoring_group_type) ? getValue("obj_type", detected) : this.monitoring_group_type;
this.objExtType = ObjTypeDetector.objExtType;
  detected = CounterConstants.HPUX;
this.obj_host_type = getValue("obj_host_type", detected);
this.obj_host_name = getValue("obj_host_name", SysJMX.getHostName());
this.objHostName = "/" + this.obj_host_name;
this.objHostHash = HashUtil.hash(objHostName);
  defaultName = this.obj_type + "1";
this.obj_name = getValue("obj_name", System.getProperty("jvmRoute", defaultName));
this.objName = objHostName + "/" + this.obj_name;
this.objHash = HashUtil.hash(objName);
origin: scouter-project/scouter

private StringSet getStringSet(String key, String deli) {
  StringSet set = new StringSet();
  String v = getValue(key);
  if (v != null) {
    String[] vv = StringUtil.split(v, deli);
    for (String x : vv) {
      x = StringUtil.trimToEmpty(x);
      if (x.length() > 0)
        set.put(x);
    }
  }
  return set;
}
origin: scouter-project/scouter

private StringSet getStringSet(String key, String deli) {
  StringSet set = new StringSet();
  String v = getValue(key);
  if (v != null) {
    String[] vv = StringUtil.split(v, deli);
    for (String x : vv) {
      x = StringUtil.trimToEmpty(x);
      if (x.length() > 0)
        set.put(x);
    }
  }
  return set;
}
origin: scouter-project/scouter

private StringSet getStringSet(String key, String deli) {
  StringSet set = new StringSet();
  String v = getValue(key);
  if (v != null) {
    String[] vv = StringUtil.split(v, deli);
    for (String x : vv) {
      x = StringUtil.trimToEmpty(x);
      if (x.length() > 0)
        set.put(x);
    }
  }
  return set;
}
origin: scouter-project/scouter

public void process(CounterBasket pw) throws IOException {
  Configure conf = Configure.getInstance();
  boolean redisEnabled = conf.getBoolean("redis_enabled", false);
  if (redisEnabled) {
    String serverIp = conf.getValue("redis_server_ip", "127.0.0.1");
    int serverPort = conf.getInt("redis_server_port", 6379);
    String perfInfo = getRedisPerfInfo(serverIp, serverPort);
    String[] lines = perfInfo.split("\n");
    PerfCounterPack p = pw.getPack(conf.getObjName(), TimeTypeEnum.REALTIME);
    for (String line : lines) {
      String key = line.substring(0, line.indexOf(':'));
      String value = line.substring(line.indexOf(':') + 1);
      if (floatSet.contains(key)) {
        p.put(key, new FloatValue(Float.valueOf(value.trim())));
      }
      if (decimalSet.contains(key)) {
        p.put(key, new DecimalValue(Long.valueOf(value.trim())));
      }
    }
  }
}
origin: scouter-project/scouter

this.mgr_log_ignore_ids = getStringSet("mgr_log_ignore_ids", ",");
this.net_local_udp_ip = getValue("net_local_udp_ip");
this.net_local_udp_port = getInt("net_local_udp_port", 0);
this.net_collector_ip = getValue("net_collector_ip", getValue("server.addr", "127.0.0.1"));
this.net_collector_udp_port = getInt("net_collector_udp_port", getInt("server.port", NetConstants.SERVER_UDP_PORT));
this.net_collector_tcp_port = getInt("net_collector_tcp_port", getInt("server.port", NetConstants.SERVER_TCP_PORT));
this.counter_netstat_enabled = getBoolean("counter_netstat_enabled", true);
this.log_dir = getValue("log_dir", "./logs");
this.log_rotation_enalbed = getBoolean("log_rotation_enalbed", true);
this.log_keep_days = getInt("log_keep_days", 365);
this.counter_object_registry_path = getValue("counter_object_registry_path", "/tmp/scouter");
scouter.agentConfiguregetValue

Popular methods of Configure

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • 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
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JFrame (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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