Package org.teiid.common.buffer.impl
Class FileStorageManager
- java.lang.Object
-
- org.teiid.common.buffer.impl.FileStorageManager
-
- All Implemented Interfaces:
StorageManager
public class FileStorageManager extends Object implements StorageManager
Implements file storage that automatically splits large files and limits the number of open files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FileStorageManager.DiskStore
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_MAX_BUFFERSPACE
static int
DEFAULT_MAX_OPEN_FILES
-
Constructor Summary
Constructors Constructor Description FileStorageManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileStore
createFileStore(String name)
String
getDirectory()
long
getMaxStorageSpace()
int
getOpenFiles()
int
getOutOfDiskErrorCount()
long
getUsedBufferSpace()
Get the used buffer space in bytesvoid
initialize()
Initializevoid
setMaxBufferSpace(long maxBufferSpace)
Set the max amount of buffer space in bytesvoid
setMaxOpenFiles(int maxOpenFiles)
void
setStorageDirectory(String directory)
-
-
-
Field Detail
-
DEFAULT_MAX_OPEN_FILES
public static final int DEFAULT_MAX_OPEN_FILES
- See Also:
- Constant Field Values
-
DEFAULT_MAX_BUFFERSPACE
public static final long DEFAULT_MAX_BUFFERSPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize() throws TeiidComponentException
Initialize- Specified by:
initialize
in interfaceStorageManager
- Throws:
TeiidComponentException
-
setMaxOpenFiles
public void setMaxOpenFiles(int maxOpenFiles)
-
setStorageDirectory
public void setStorageDirectory(String directory)
-
createFileStore
public FileStore createFileStore(String name)
- Specified by:
createFileStore
in interfaceStorageManager
-
getDirectory
public String getDirectory()
-
getOpenFiles
public int getOpenFiles()
-
getUsedBufferSpace
public long getUsedBufferSpace()
Get the used buffer space in bytes- Returns:
-
getOutOfDiskErrorCount
public int getOutOfDiskErrorCount()
-
setMaxBufferSpace
public void setMaxBufferSpace(long maxBufferSpace)
Set the max amount of buffer space in bytes- Parameters:
maxBufferSpace
-
-
getMaxStorageSpace
public long getMaxStorageSpace()
- Specified by:
getMaxStorageSpace
in interfaceStorageManager
-
-