com.sun.jini.outrigger.snaplogstore
Class SnapshotFile

java.lang.Object
  extended by com.sun.jini.outrigger.snaplogstore.LogFile
      extended by com.sun.jini.outrigger.snaplogstore.SnapshotFile

 class SnapshotFile
extends LogFile

Author:
Sun Microsystems, Inc.

Field Summary
private  String fileName
           
private static Logger logger
          Logger for logging persistent store related information
private  ObjectOutputStream out
           
private  String previousFilename
           
private  RandomAccessFile snapshotFile
           
private  int suffix
           
 
Fields inherited from class com.sun.jini.outrigger.snaplogstore.LogFile
ABORT_OP, baseDir, baseFile, BATCH_TAKE_OP, BATCH_WRITE_OP, BOOT_OP, CANCEL_OP, COMMIT_OP, JOINSTATE_OP, LOG_TYPE, LOG_VERSION, NOTIFIED_OP, PREPARE_OP, REGISTER_OP, RENEW_OP, TAKE_OP, UUID_OP, WRITE_OP
 
Constructor Summary
SnapshotFile(String basePath, File[] recover)
           
 
Method Summary
(package private)  void close()
          Close the log, but don't remove it.
(package private)  void commit()
           
(package private)  void destroy()
          Override destroy so we can try to close snapshotFile before calling super tries to delete all the files.
(package private)  ObjectOutputStream next()
          Switch this over to the next path in the list
 
Methods inherited from class com.sun.jini.outrigger.snaplogstore.LogFile
existingLogs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snapshotFile

private RandomAccessFile snapshotFile

fileName

private String fileName

previousFilename

private String previousFilename

out

private ObjectOutputStream out

suffix

private int suffix

logger

private static final Logger logger
Logger for logging persistent store related information

Constructor Detail

SnapshotFile

SnapshotFile(String basePath,
             File[] recover)
       throws IOException
Throws:
IOException
Method Detail

next

ObjectOutputStream next()
                  throws IOException
Switch this over to the next path in the list

Throws:
IOException

commit

void commit()
      throws IOException
Throws:
IOException

close

void close()
     throws IOException
Close the log, but don't remove it.

Throws:
IOException

destroy

void destroy()
Override destroy so we can try to close snapshotFile before calling super tries to delete all the files.

Overrides:
destroy in class LogFile


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.