org.apache.jackrabbit.core.journal
Class FileRevision

java.lang.Object
  extended by org.apache.jackrabbit.core.journal.FileRevision

public class FileRevision
extends Object

Maintains a file-based revision counter with locking, assuring uniqueness.


Constructor Summary
FileRevision(File file)
          Creates a new file based revision counter.
 
Method Summary
 long get()
          Return current counter value.
 void set(long value)
          Set current counter value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRevision

public FileRevision(File file)
             throws JournalException
Creates a new file based revision counter.

Parameters:
file - holding global counter
Throws:
JournalException - if some error occurs
Method Detail

get

public long get()
         throws JournalException
Return current counter value.

Returns:
counter value
Throws:
JournalException - if some error occurs

set

public void set(long value)
         throws JournalException
Set current counter value.

Parameters:
value - new counter value
Throws:
JournalException - if some error occurs


Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.