public synchronized void saveCommitPoint(Long indexCommitGen){
  AtomicInteger reserveCount=savedCommits.get(indexCommitGen);
  if (reserveCount == null)   reserveCount=new AtomicInteger();
  reserveCount.incrementAndGet();
  savedCommits.put(indexCommitGen,reserveCount);
}

public synchronized void saveCommitPoint ( Long indexCommitGen ) { AtomicInteger reserveCount = savedCommits . get ( indexCommitGen ) ; if ( reserveCount == null ) reserveCount = new AtomicInteger ( ) ; reserveCount . incrementAndGet ( ) ; savedCommits . put ( indexCommitGen , reserveCount ) ; }
permanently prevent this commit point from being deleted . a counter is used to allow a commit point to be correctly saved and released multiple times .
