|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.File
ariba.util.log.ConstrainedDirectory
public class ConstrainedDirectory
A subclass Directory whose size can be "constrained": methods are provided to purge the contents of the directory until the size is reduced to a specified value in megabytes.
Field Summary |
---|
Fields inherited from class java.io.File |
---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
---|---|
ConstrainedDirectory(java.io.File path)
|
|
ConstrainedDirectory(java.io.File path,
Logger logger)
|
|
ConstrainedDirectory(java.io.File path,
java.lang.String file)
|
|
ConstrainedDirectory(java.io.File path,
java.lang.String file,
Logger logger)
|
|
ConstrainedDirectory(java.lang.String path)
|
|
ConstrainedDirectory(java.lang.String path,
Logger logger)
|
|
ConstrainedDirectory(java.lang.String path,
java.lang.String file)
|
|
ConstrainedDirectory(java.lang.String path,
java.lang.String file,
Logger logger)
|
Method Summary | |
---|---|
java.io.File |
fileAt(int index)
|
boolean |
instantiate()
|
java.util.List |
listing()
|
void |
LogError(java.lang.String message)
|
int |
purge(int megaBytesToPurge)
Purges a specified number of bytes (in megabytes) from this constrained directory |
int |
purgeOnConstraint()
Purges this constrained directory of any bytes in excess of the max size allowed. |
boolean |
scan()
|
void |
setMaxMegaBytes(int maxMegaBytes)
Sets the max size of this contrained directory in mega bytes. |
void |
sortOnDate()
|
long |
sumBytes()
|
int |
sumMegaBytes()
|
int |
testConstraints()
returns the number of mega bytes to purge |
Methods inherited from class java.io.File |
---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConstrainedDirectory(java.io.File path)
public ConstrainedDirectory(java.io.File path, Logger logger)
public ConstrainedDirectory(java.lang.String path)
public ConstrainedDirectory(java.lang.String path, Logger logger)
public ConstrainedDirectory(java.lang.String path, java.lang.String file)
public ConstrainedDirectory(java.lang.String path, java.lang.String file, Logger logger)
public ConstrainedDirectory(java.io.File path, java.lang.String file)
public ConstrainedDirectory(java.io.File path, java.lang.String file, Logger logger)
Method Detail |
---|
public void setMaxMegaBytes(int maxMegaBytes)
maxMegaBytes
- the max size of this contrained directory in mega bytespublic int purgeOnConstraint()
public int testConstraints()
public int purge(int megaBytesToPurge)
megaBytesToPurge
- the size in Mega Bytes to purge
public java.util.List listing()
public java.io.File fileAt(int index)
public int sumMegaBytes()
public long sumBytes()
public boolean instantiate()
public void LogError(java.lang.String message)
public boolean scan()
public void sortOnDate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |