|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.flatfile.DataDirectoryConfiguration
public class DataDirectoryConfiguration
A simple cap on the directories to use and the amount of data to put in them. Size is noted in bytes.
| Field Summary | |
|---|---|
static long |
MAX_SIZE
Deprecated. |
| Constructor Summary | |
|---|---|
DataDirectoryConfiguration(java.lang.String directory,
long sizeLimit)
|
|
| Method Summary | |
|---|---|
void |
adjustUsedSpace(long adjustment)
Adjust disk space used both actual bytes and estimated real disk space based on the filesystem's minimum block size. |
boolean |
canStoreData(long size)
Returns true if there is enough space to store file. |
DataDirectoryConfiguration |
clone()
|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object obj)
|
long |
getActualSize()
Get the size, in bytes, of actual data stored in this directory. |
java.lang.String |
getDirectory()
Get the path to the directory represented by this DataDirectoryConfiguration object. |
java.io.File |
getDirectoryFile()
Get the file for the directory represented by this DataDirectoryConfiguration object. |
long |
getSizeLimit()
Get the administrator-defined size limit for the DataDirectoryConfiguration. |
int |
hashCode()
|
boolean |
isOverflowBeenDetected()
True if the variable keeping track of the actual bytes used has overflowed. |
void |
setDirectory(java.lang.String directory)
Set the directory represented by this DataDirectoryConfiguration object. |
void |
setSizeLimit(long sizeLimit)
Set the size limit for the DataDirectoryConfiguration. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long MAX_SIZE
Represents the maximum size of a data directory.
Note this value is ignored, as the maximum size is whether the administrator sets in the DataDirectoryConfiguration.
| Constructor Detail |
|---|
public DataDirectoryConfiguration(java.lang.String directory,
long sizeLimit)
directory - sizeLimit - | Method Detail |
|---|
public java.lang.String getDirectory()
Get the path to the directory represented by this DataDirectoryConfiguration object.
public java.io.File getDirectoryFile()
Get the file for the directory represented by this DataDirectoryConfiguration object.
public void setDirectory(java.lang.String directory)
Set the directory represented by this DataDirectoryConfiguration object.
directory - public long getSizeLimit()
Get the administrator-defined size limit for the DataDirectoryConfiguration.
public void setSizeLimit(long sizeLimit)
Set the size limit for the DataDirectoryConfiguration.
sizeLimit - public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic void adjustUsedSpace(long adjustment)
Adjust disk space used both actual bytes and estimated real disk space based on the filesystem's minimum block size.
adjustment - Positive or negative value. E.g., if a KB was deleted, adjustment would be -1024public boolean canStoreData(long size)
Returns true if there is enough space to store file.
size - The size of the file being added.public long getActualSize()
Get the size, in bytes, of actual data stored in this directory.
public DataDirectoryConfiguration clone()
clone in class java.lang.Objectpublic boolean isOverflowBeenDetected()
True if the variable keeping track of the actual bytes used has overflowed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||