Class FileRevision

  • All Implemented Interfaces:

    public class FileRevision
    extends Object
    implements InstanceRevision
    Maintains a file-based revision counter with locking, assuring uniqueness.
    • Field Detail

      • sync

        protected final boolean sync
        Flag indicating whether to sync the file on every write.
      • value

        protected long value
        Cached value.
      • closed

        protected boolean closed
        Flag indicating whether this revision file is closed.
    • Constructor Detail

      • FileRevision

        public FileRevision​(File file,
                            boolean sync)
                     throws JournalException
        Creates a new file based revision counter.
        file - holding global counter
        sync - whether to sync the file on every write
        JournalException - if some error occurs