Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.archive.crawler.util
Class CheckpointUtils

    java.lang.Object
      org.archive.crawler.util.CheckpointUtils

    public class CheckpointUtils

extends java.lang.Object

Utilities useful checkpointing.

Version:
  $Date: 2006-09-25 22:40:19 +0000 (Mon, 25 Sep 2006) $ $Revision: 4658 $
Author:
  stack

Field Summary
`static java.lang.String` | `SERIALIZED_CLASS_SUFFIX`

Constructor Summary
`CheckpointUtils()`

Method Summary
`static java.io.File` | `getBdbSubDirectory(java.io.File checkpointDir)`
`static java.io.File` | `getClassCheckpointFile(java.io.File checkpointDir, java.lang.Class c)`
`static java.io.File` | `getClassCheckpointFile(java.io.File checkpointDir, java.lang.String suffix, java.lang.Class c)`
`static java.lang.String` | `getClassCheckpointFilename(java.lang.Class c)`
`static java.lang.String` | `getClassCheckpointFilename(java.lang.Class c, java.lang.String suffix)`
`static java.io.FilenameFilter` | `getJeLogsFilter()`
`static
`<T> T`
` | `readObjectFromFile(java.lang.Class<T> c, java.io.File dir)`
`static
`<T> T`
` | `readObjectFromFile(java.lang.Class<T> c, java.lang.String suffix, java.io.File dir)`
`static void` | `writeObjectToFile(java.lang.Object o, java.io.File dir)` Utility function to serialize an object to a file in current checkpoint dir.
`static void` | `writeObjectToFile(java.lang.Object o, java.lang.String suffix, java.io.File dir)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SERIALIZED_CLASS_SUFFIX

    public static final java.lang.String SERIALIZED_CLASS_SUFFIX

See Also:
  Constant Field Values

Constructor Detail

### CheckpointUtils

    public CheckpointUtils()

Method Detail

### getBdbSubDirectory

    public static java.io.File getBdbSubDirectory(java.io.File checkpointDir)

### getClassCheckpointFile

    public static java.io.File getClassCheckpointFile(java.io.File checkpointDir,
                                                      java.lang.String suffix,
                                                      java.lang.Class c)

### getClassCheckpointFile

    public static java.io.File getClassCheckpointFile(java.io.File checkpointDir,
                                                      java.lang.Class c)

### getClassCheckpointFilename

    public static java.lang.String getClassCheckpointFilename(java.lang.Class c)

### getClassCheckpointFilename

    public static java.lang.String getClassCheckpointFilename(java.lang.Class c,
                                                              java.lang.String suffix)

### writeObjectToFile

    public static void writeObjectToFile(java.lang.Object o,
                                         java.io.File dir)
                                  throws java.io.IOException

  Utility function to serialize an object to a file in current checkpoint dir. Facilities to store related files alongside the serialized object in a directory named with a `.auxillary` suffix.

  Parameters:
    `o` - Object to serialize.
    `dir` - Directory to serialize into.
  Throws:
    `java.io.IOException`

### writeObjectToFile

    public static void writeObjectToFile(java.lang.Object o,
                                         java.lang.String suffix,
                                         java.io.File dir)
                                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### readObjectFromFile

    public static <T> T readObjectFromFile(java.lang.Class<T> c,
                                           java.io.File dir)
                                throws java.io.FileNotFoundException,
                                       java.io.IOException,
                                       java.lang.ClassNotFoundException

  Throws:
    `java.io.FileNotFoundException`
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### readObjectFromFile

    public static <T> T readObjectFromFile(java.lang.Class<T> c,
                                           java.lang.String suffix,
                                           java.io.File dir)
                                throws java.io.FileNotFoundException,
                                       java.io.IOException,
                                       java.lang.ClassNotFoundException

  Throws:
    `java.io.FileNotFoundException`
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### getJeLogsFilter

    public static java.io.FilenameFilter getJeLogsFilter()

  Returns:
    Instance of filename filter that will let through files ending in '.jdb' (i.e. bdb je log files).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Internet Archive. All Rights Reserved.