Code example for AtomicLong

Methods: longValue

   * Write SCN value to file. If SCN file exists, move it aside and create a new file 
   * w/new value. 
  private void writeScnToFile() throws IOException 
    long scn = _scn.longValue();
    File dir = _staticConfig.getScnDir();
    if (! dir.exists() && !dir.mkdirs())
      throw new IOException("unable to create SCN file parent:" + dir.getAbsolutePath());
    // delete the temp file if one exists 
    File tempScnFile = new File(_scnFileName + TEMP);
    if (tempScnFile.exists() && !tempScnFile.delete())
      LOG.error("unable to erase temp SCN file: " + tempScnFile.getAbsolutePath());
Stop searching for code, let great code find you!  Add Codota to your java IDE