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

How to use
getPropertyFile
method
in
scouter.agent.Configure

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

origin: scouter-project/scouter

public boolean saveText(String text) {
  File file = getPropertyFile();
  OutputStream out = null;
  try {
    if (file.getParentFile().exists() == false) {
      file.getParentFile().mkdirs();
    }
    out = new FileOutputStream(file);
    out.write(text.getBytes());
    return true;
  } catch (Exception e) {
  } finally {
    FileUtil.close(out);
  }
  return false;
}
origin: scouter-project/scouter

public boolean saveText(String text) {
  File file = getPropertyFile();
  OutputStream out = null;
  try {
    if (file.getParentFile().exists() == false) {
      file.getParentFile().mkdirs();
    }
    out = new FileOutputStream(file);
    out.write(text.getBytes());
    return true;
  } catch (Exception e) {
  } finally {
    FileUtil.close(out);
  }
  return false;
}
origin: scouter-project/scouter

public boolean saveText(String text) {
  File file = getPropertyFile();
  OutputStream out = null;
  try {
    if (file.getParentFile().exists() == false) {
      file.getParentFile().mkdirs();
    }
    out = new FileOutputStream(file);
    out.write(text.getBytes());
    return true;
  } catch (Exception e) {
  } finally {
    FileUtil.close(out);
  }
  return false;
}
origin: scouter-project/scouter

public String loadText() {
  File file = getPropertyFile();
  InputStream fin = null;
  try {
    fin = new FileInputStream(file);
    byte[] buff = FileUtil.readAll(fin);
    return new String(buff);
  } catch (Exception e) {
  } finally {
    FileUtil.close(fin);
  }
  return null;
}
origin: scouter-project/scouter

public String loadText() {
  File file = getPropertyFile();
  InputStream fin = null;
  try {
    fin = new FileInputStream(file);
    byte[] buff = FileUtil.readAll(fin);
    return new String(buff);
  } catch (Exception e) {
  } finally {
    FileUtil.close(fin);
  }
  return null;
}
origin: scouter-project/scouter

public String loadText() {
  File file = getPropertyFile();
  InputStream fin = null;
  try {
    fin = new FileInputStream(file);
    byte[] buff = FileUtil.readAll(fin);
    return new String(buff);
  } catch (Exception e) {
  } finally {
    FileUtil.close(fin);
  }
  return null;
}
origin: scouter-project/scouter

public synchronized boolean reload(boolean force) {
  long now = System.currentTimeMillis();
  if (force == false && now < last_check + 3000)
    return false;
  last_check = now;
  File file = getPropertyFile();
  if (file.lastModified() == last_load_time) {
    return false;
  }
  last_load_time = file.lastModified();
  Properties temp = new Properties();
  if (file.canRead()) {
    FileInputStream in = null;
    try {
      in = new FileInputStream(file);
      temp.load(in);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      FileUtil.close(in);
    }
  }
  property = ConfigValueUtil.replaceSysProp(temp);
  apply();
  ConfObserver.run();
  return true;
}
origin: scouter-project/scouter

public synchronized boolean reload(boolean force) {
  long now = System.currentTimeMillis();
  if (force == false && now < last_check + 3000)
    return false;
  last_check = now;
  File file = getPropertyFile();
  if (file.lastModified() == last_load_time) {
    return false;
  }
  last_load_time = file.lastModified();
  Properties temp = new Properties();
  if (file.canRead()) {
    FileInputStream in = null;
    try {
      in = new FileInputStream(file);
      temp.load(in);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      FileUtil.close(in);
    }
  }
  property = ConfigValueUtil.replaceSysProp(temp);
  apply();
  ConfObserver.run();
  return true;
}
origin: scouter-project/scouter

public synchronized boolean reload(boolean force) {
  long now = System.currentTimeMillis();
  if (force == false && now < last_check + 3000)
    return false;
  last_check = now;
  File file = getPropertyFile();
  if (file.lastModified() == last_load_time) {
    return false;
  }
  last_load_time = file.lastModified();
  Properties temp = new Properties();
  if (file.canRead()) {
    FileInputStream in = null;
    try {
      in = new FileInputStream(file);
      temp.load(in);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      FileUtil.close(in);
    }
  }
  property = ConfigValueUtil.replaceSysProp(temp);
  apply();
  ConfObserver.run();
  return true;
}
origin: scouter-project/scouter

private void load() {
  File dir = conf.getPropertyFile().getParentFile();
  String filename = conf.trace_delayed_service_mgr_filename;
  File file = new File(dir, filename);
origin: scouter-project/scouter

private void load() {
  File dir = conf.getPropertyFile().getParentFile();
  String filename = conf.trace_delayed_service_mgr_filename;
  File file = new File(dir, filename);
origin: io.github.scouter-project/scouter-agent-java

public boolean saveText(String text) {
  File file = getPropertyFile();
  OutputStream out = null;
  try {
    if (file.getParentFile().exists() == false) {
      file.getParentFile().mkdirs();
    }
    out = new FileOutputStream(file);
    out.write(text.getBytes());
    return true;
  } catch (Exception e) {
  } finally {
    FileUtil.close(out);
  }
  return false;
}
origin: io.github.scouter-project/scouter-agent-java

public String loadText() {
  File file = getPropertyFile();
  InputStream fin = null;
  try {
    fin = new FileInputStream(file);
    byte[] buff = FileUtil.readAll(fin);
    return new String(buff);
  } catch (Exception e) {
  } finally {
    FileUtil.close(fin);
  }
  return null;
}
origin: io.github.scouter-project/scouter-agent-java

public synchronized boolean reload(boolean force) {
  long now = System.currentTimeMillis();
  if (force == false && now < last_check + 3000)
    return false;
  last_check = now;
  File file = getPropertyFile();
  if (file.lastModified() == last_load_time) {
    return false;
  }
  last_load_time = file.lastModified();
  Properties temp = new Properties();
  if (file.canRead()) {
    FileInputStream in = null;
    try {
      in = new FileInputStream(file);
      temp.load(in);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      FileUtil.close(in);
    }
  }
  property = ConfigValueUtil.replaceSysProp(temp);
  apply();
  ConfObserver.run();
  return true;
}
origin: io.github.scouter-project/scouter-agent-java

private void load() {
  File dir = conf.getPropertyFile().getParentFile();
  String filename = conf.trace_delayed_service_mgr_filename;
  File file = new File(dir, filename);
scouter.agentConfiguregetPropertyFile

Popular methods of Configure

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

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
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