|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.framework.internal.reliablefile.ReliableFile
public class ReliableFile
ReliableFile class used by ReliableFileInputStream and ReliableOutputStream. This class encapsulates all the logic for reliable file support.
| Field Summary | |
|---|---|
static int |
GENERATION_LATEST
Use the last generation of the file |
static int |
GENERATIONS_INFINITE
Keep infinite backup files |
static int |
OPEN_BEST_AVAILABLE
Open mask. |
static int |
OPEN_FAIL_ON_PRIMARY
Open mask. |
static java.lang.String |
PROP_MAX_BUFFER
Property to set the maximum size of a file that will be buffered. |
static java.lang.String |
PROP_MAX_GENERATIONS
The maximum number of generations to keep as backup files in case last generation file is determined to be invalid. |
static java.lang.String |
PROP_OSGI_LOCKING
|
static java.lang.String |
tmpExt
Extension of tmp file used during writing. |
| Method Summary | |
|---|---|
static void |
cleanupGenerations(java.io.File base)
Delete any old excess generations of a given reliable file. |
static boolean |
delete(java.io.File deleteFile)
Delete the specified reliable file on the underlying file system. |
static boolean |
exists(java.io.File file)
Answers a boolean indicating whether or not the specified reliable file exists on the underlying file system. |
static void |
fileUpdated(java.io.File file)
Inform ReliableFile that a file has been updated outside of ReliableFile. |
static java.lang.String[] |
getBaseFiles(java.io.File directory)
Get a list of ReliableFile base names in a given directory. |
long |
lastModified()
Returns the time that this ReliableFile was last modified. |
static long |
lastModified(java.io.File file)
Returns the time that the reliable file was last modified. |
static int |
lastModifiedVersion(java.io.File file)
Returns the a version number of a reliable managed file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OPEN_BEST_AVAILABLE
OPEN_FAIL_ON_PRIMARY.
public static final int OPEN_FAIL_ON_PRIMARY
OPEN_BEST_AVAILABLE.
public static final int GENERATION_LATEST
public static final int GENERATIONS_INFINITE
public static final java.lang.String tmpExt
public static final java.lang.String PROP_MAX_BUFFER
BufferedInputStream and reset the buffer to avoid having to read the data from the
media twice. Since this method require memory for storage, it is limited to this size. The default
maximum is 128-KBytes.
public static final java.lang.String PROP_MAX_GENERATIONS
public static final java.lang.String PROP_OSGI_LOCKING
BasicLocation.PROP_OSGI_LOCKING,
Constant Field Values| Method Detail |
|---|
public static boolean exists(java.io.File file)
file - returns true if the specified reliable file exists; otherwise false is returned
true if the specified reliable file exists,
false otherwise.public static long lastModified(java.io.File file)
file - the file to determine the time of.
public long lastModified()
public static int lastModifiedVersion(java.io.File file)
file - the file to determine the version of.
public static boolean delete(java.io.File deleteFile)
deleteFile - the reliable file to delete
true if the specified reliable file was deleted,
false otherwise.
public static java.lang.String[] getBaseFiles(java.io.File directory)
throws java.io.IOException
directory - the directory to inquire.
java.io.IOException - if an error occurs.public static void cleanupGenerations(java.io.File base)
base - realible file.public static void fileUpdated(java.io.File file)
file -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||