com.bigdata.service
Class DistributedTransactionService.SnapshotHelper
java.lang.Object
com.bigdata.service.DistributedTransactionService.SnapshotHelper
- Enclosing class:
- DistributedTransactionService
public static class DistributedTransactionService.SnapshotHelper
- extends Object
A helper class for reading and writing snapshots of the commit time
index. The image contains the commit timestamps in order.
Note: The caller must prevent concurrent changes to the index.
- Version:
- $Id: DistributedTransactionService.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
- TODO:
- write counters into the files since the system clock could be
messed with on before a restart but the counters will always be
valid. we would then either read both and choose one, or have a
method to report the header with the earlier counter., Checksum the commit time log file? this is easily done either using
a
ByteBuffer or using Adler32.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistributedTransactionService.SnapshotHelper
public DistributedTransactionService.SnapshotHelper()
read
public static int read(CommitTimeIndex ndx,
File file)
throws IOException
- Throws:
IOException
read
public static int read(CommitTimeIndex ndx,
DataInputStream is)
throws IOException
- Throws:
IOException
write
public static int write(CommitTimeIndex ndx,
File file)
throws IOException
- Throws:
IOException
write
public static int write(CommitTimeIndex ndx,
DataOutputStream os)
throws IOException
- Throws:
IOException
Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.