Code example for AtomicLong

Methods: longValue, set

0
    } 
    else 
    { 
      LOG.info("Initial max SCN does not exist. Defaulting to initial value from configuration: "
          + _staticConfig.getInitVal());
      _scn.set(_staticConfig.getInitVal());
      writeScnToFile(); 
    } 
  } 
 
  /** 
   * 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());