org.teiid.common.buffer.impl
Class FileStorageManager

java.lang.Object
  extended by org.teiid.common.buffer.impl.FileStorageManager
All Implemented Interfaces:
StorageManager

public class FileStorageManager
extends java.lang.Object
implements StorageManager

Implements file storage that automatically splits large files and limits the number of open files.


Nested Class Summary
 class FileStorageManager.DiskStore
           
 
Field Summary
static long DEFAULT_MAX_BUFFERSPACE
           
static long DEFAULT_MAX_FILESIZE
           
static int DEFAULT_MAX_OPEN_FILES
           
 
Constructor Summary
FileStorageManager()
           
 
Method Summary
 FileStore createFileStore(java.lang.String name)
           
 java.lang.String getDirectory()
           
 long getMaxFileSize()
           
 int getOpenFiles()
           
 long getUsedBufferSpace()
          Get the used buffer space in bytes
 void initialize()
          Initialize
 void setMaxBufferSpace(long maxBufferSpace)
          Set the max amount of buffer space in bytes
 void setMaxFileSize(long maxFileSize)
           
 void setMaxOpenFiles(int maxOpenFiles)
           
 void setStorageDirectory(java.lang.String directory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_OPEN_FILES

public static final int DEFAULT_MAX_OPEN_FILES
See Also:
Constant Field Values

DEFAULT_MAX_FILESIZE

public static final long DEFAULT_MAX_FILESIZE
See Also:
Constant Field Values

DEFAULT_MAX_BUFFERSPACE

public static final long DEFAULT_MAX_BUFFERSPACE
See Also:
Constant Field Values
Constructor Detail

FileStorageManager

public FileStorageManager()
Method Detail

initialize

public void initialize()
                throws TeiidComponentException
Initialize

Specified by:
initialize in interface StorageManager
Throws:
TeiidComponentException

setMaxFileSize

public void setMaxFileSize(long maxFileSize)

setMaxOpenFiles

public void setMaxOpenFiles(int maxOpenFiles)

setStorageDirectory

public void setStorageDirectory(java.lang.String directory)

createFileStore

public FileStore createFileStore(java.lang.String name)
Specified by:
createFileStore in interface StorageManager

getMaxFileSize

public long getMaxFileSize()

getDirectory

public java.lang.String getDirectory()

getOpenFiles

public int getOpenFiles()

getUsedBufferSpace

public long getUsedBufferSpace()
Get the used buffer space in bytes

Returns:

setMaxBufferSpace

public void setMaxBufferSpace(long maxBufferSpace)
Set the max amount of buffer space in bytes

Parameters:
maxBufferSpace -


Copyright © 2010. All Rights Reserved.