public class ReadMuxStreamDirectory extends Object
| Modifier and Type | Field and Description |
|---|---|
protected AtomicLong |
closeTime |
protected static int |
DEFAULT_MAP_SIZE |
protected boolean |
deleteFreed |
protected Path |
dirDataFile |
protected Path |
dirMetaFile |
protected MuxyEventListener |
eventListener |
protected static DecimalFormat |
fileFormat |
protected static int |
MAX_RECORDS_READ |
protected AtomicBoolean |
releaseComplete |
protected int |
startFile |
protected Path |
streamDirectory |
protected com.addthis.muxy.MuxDirectory |
streamDirectoryConfig |
protected Map<Integer,MuxStream> |
streamDirectoryMap |
protected FileChannel |
writeMutexFile |
protected FileLock |
writeMutexLock |
| Constructor and Description |
|---|
ReadMuxStreamDirectory(Path dir) |
ReadMuxStreamDirectory(Path dir,
MuxyEventListener listener) |
| Modifier and Type | Method and Description |
|---|---|
MuxStream |
findStream(int streamID) |
protected static String |
formatFileName(int blockFile) |
Collection<Path> |
getActiveFiles() |
protected Path |
getFileByID(int fileID) |
static Path |
getFileByID(Path streamDirectory,
int fileID) |
Collection<MuxStream> |
listStreams() |
protected void |
publishEvent(MuxyStreamEvent ID,
Object target) |
protected void |
readMetaLog() |
int |
size() |
protected static final int DEFAULT_MAP_SIZE
protected static final int MAX_RECORDS_READ
protected static final DecimalFormat fileFormat
protected final Path streamDirectory
protected final Path dirMetaFile
protected final Path dirDataFile
protected final com.addthis.muxy.MuxDirectory streamDirectoryConfig
protected final AtomicBoolean releaseComplete
protected final AtomicLong closeTime
protected FileChannel writeMutexFile
protected FileLock writeMutexLock
protected MuxyEventListener eventListener
protected boolean deleteFreed
protected int startFile
public ReadMuxStreamDirectory(Path dir, MuxyEventListener listener) throws Exception
Exceptionprotected static String formatFileName(int blockFile)
protected Path getFileByID(int fileID)
protected void publishEvent(MuxyStreamEvent ID, Object target)
protected void readMetaLog()
throws IOException
IOExceptionpublic Collection<MuxStream> listStreams() throws IOException
IOExceptionpublic int size()
public MuxStream findStream(int streamID) throws IOException
IOExceptionpublic Collection<Path> getActiveFiles() throws IOException
IOExceptionCopyright © 2018 AddThis. All rights reserved.