public class MuxFileDirectory extends ReadMuxFileDirectory
| Modifier and Type | Field and Description |
|---|---|
protected com.addthis.muxy.MuxFileDirectoryCacheInstance |
cacheInstance |
DEFAULT_MAP_SIZE, eventListener, fileMap, fileMetaConfig, fileMetaLog, lastMapSize, MAX_RECORDS_READ, SORTED_DIR, streamDirectory, streamMux| Constructor and Description |
|---|
MuxFileDirectory(Path dir,
MuxyEventListener listener) |
MuxFileDirectory(Path dir,
MuxyEventListener listener,
com.addthis.muxy.MuxFileDirectoryCacheInstance cacheInstance) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
defrag()
iterate of all files and re-write them sequentially into new file space
|
boolean |
exists(String fileName) |
int |
getFileCount() |
protected MuxStreamDirectory |
getStreamManager() |
protected MuxStreamDirectory |
initMuxStreamDirectory(Path dir,
MuxyEventListener listener) |
boolean |
isWritingComplete() |
Collection<MuxFile> |
listFiles() |
OutputStream |
newStreamsOutput(WritableMuxFile muxFile) |
OutputStream |
newStreamsOutput(WritableMuxFile muxFile,
boolean compress) |
WritableMuxFile |
openFile(String fileName,
boolean create) |
protected WritableMuxFile |
parseNextMuxFile(InputStream in) |
void |
setDeleteFreed(boolean deleteFreed) |
void |
setLazyLogClose(int timeoutMS) |
void |
setMaxBlockSize(int size) |
void |
setMaxFileSize(int size) |
void |
setWriteThrashold(int threshold) |
void |
waitForWriteClosure() |
boolean |
waitForWriteClosure(int waitTime) |
getDirectory, isMuxDir, publishEvent, readConfig, readMetaLogprotected final com.addthis.muxy.MuxFileDirectoryCacheInstance cacheInstance
public MuxFileDirectory(Path dir, MuxyEventListener listener) throws Exception
Exceptionpublic MuxFileDirectory(Path dir, MuxyEventListener listener, com.addthis.muxy.MuxFileDirectoryCacheInstance cacheInstance) throws Exception
Exceptionprotected MuxStreamDirectory initMuxStreamDirectory(Path dir, MuxyEventListener listener) throws Exception
initMuxStreamDirectory in class ReadMuxFileDirectoryExceptionpublic int getFileCount()
getFileCount in class ReadMuxFileDirectoryprotected WritableMuxFile parseNextMuxFile(InputStream in) throws IOException
parseNextMuxFile in class ReadMuxFileDirectoryIOExceptionpublic Collection<MuxFile> listFiles() throws IOException
listFiles in class ReadMuxFileDirectoryIOExceptionpublic void setDeleteFreed(boolean deleteFreed)
public void setWriteThrashold(int threshold)
throws IOException
IOExceptionpublic void setLazyLogClose(int timeoutMS)
throws IOException
IOExceptionpublic void setMaxBlockSize(int size)
throws IOException
IOExceptionpublic void setMaxFileSize(int size)
throws IOException
IOExceptionpublic boolean isWritingComplete()
public void waitForWriteClosure()
public boolean waitForWriteClosure(int waitTime)
protected MuxStreamDirectory getStreamManager()
getStreamManager in class ReadMuxFileDirectorypublic boolean exists(String fileName)
exists in class ReadMuxFileDirectorypublic WritableMuxFile openFile(String fileName, boolean create) throws IOException
openFile in class ReadMuxFileDirectoryIOExceptionprotected void defrag()
throws IOException
IOExceptionpublic OutputStream newStreamsOutput(WritableMuxFile muxFile) throws IOException
IOExceptionpublic OutputStream newStreamsOutput(WritableMuxFile muxFile, boolean compress) throws IOException
IOExceptionCopyright © 2018 AddThis. All rights reserved.