public class ReadMuxFileDirectory extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_MAP_SIZE |
protected MuxyEventListener |
eventListener |
protected Map<String,MuxFile> |
fileMap |
protected Path |
fileMetaConfig |
protected Path |
fileMetaLog |
protected int |
lastMapSize |
protected static int |
MAX_RECORDS_READ |
protected static boolean |
SORTED_DIR |
protected Path |
streamDirectory |
protected ReadMuxStreamDirectory |
streamMux |
| Constructor and Description |
|---|
ReadMuxFileDirectory(Path dir) |
ReadMuxFileDirectory(Path dir,
MuxyEventListener listener) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String fileName) |
Path |
getDirectory() |
int |
getFileCount() |
protected ReadMuxStreamDirectory |
getStreamManager() |
protected ReadMuxStreamDirectory |
initMuxStreamDirectory(Path dir,
MuxyEventListener listener) |
static boolean |
isMuxDir(Path dir) |
Collection<MuxFile> |
listFiles() |
MuxFile |
openFile(String fileName,
boolean create) |
protected MuxFile |
parseNextMuxFile(InputStream in) |
void |
publishEvent(MuxyFileEvent ID,
Object target) |
protected void |
readConfig() |
protected void |
readMetaLog() |
protected static final int MAX_RECORDS_READ
protected static final boolean SORTED_DIR
protected static final int DEFAULT_MAP_SIZE
protected final ReadMuxStreamDirectory streamMux
protected final MuxyEventListener eventListener
protected final Path streamDirectory
protected final Path fileMetaLog
protected final Path fileMetaConfig
protected int lastMapSize
public ReadMuxFileDirectory(Path dir, MuxyEventListener listener) throws Exception
Exceptionpublic static boolean isMuxDir(Path dir)
protected ReadMuxStreamDirectory initMuxStreamDirectory(Path dir, MuxyEventListener listener) throws Exception
Exceptionpublic int getFileCount()
public Path getDirectory()
protected void readConfig()
throws IOException
IOExceptionpublic void publishEvent(MuxyFileEvent ID, Object target)
protected ReadMuxStreamDirectory getStreamManager()
protected MuxFile parseNextMuxFile(InputStream in) throws IOException
IOExceptionprotected void readMetaLog()
throws IOException
IOExceptionpublic boolean exists(String fileName)
public MuxFile openFile(String fileName, boolean create) throws IOException
IOExceptionpublic Collection<MuxFile> listFiles() throws IOException
IOExceptionCopyright © 2018 AddThis. All rights reserved.