Package io.split.client
Class AbstractLocalhostSplitFile
- java.lang.Object
-
- java.lang.Thread
-
- io.split.client.AbstractLocalhostSplitFile
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
LegacyLocalhostSplitFile,YamlLocalhostSplitFile
public abstract class AbstractLocalhostSplitFile extends Thread
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected File_fileprotected LocalhostSplitFactory_splitFactoryprotected AtomicBoolean_stopprotected WatchService_watcher-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractLocalhostSplitFile(LocalhostSplitFactory splitFactory, String directory, String fileName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanisStopped()abstract Map<SplitAndKey,LocalhostSplit>readOnSplits()voidregisterWatcher()voidrun()voidstopThread()-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
_splitFactory
protected final LocalhostSplitFactory _splitFactory
-
_file
protected final File _file
-
_watcher
protected final WatchService _watcher
-
_stop
protected final AtomicBoolean _stop
-
-
Constructor Detail
-
AbstractLocalhostSplitFile
public AbstractLocalhostSplitFile(LocalhostSplitFactory splitFactory, String directory, String fileName) throws IOException
- Throws:
IOException
-
-
Method Detail
-
isStopped
public boolean isStopped()
-
stopThread
public void stopThread()
-
registerWatcher
public void registerWatcher() throws IOException- Throws:
IOException
-
readOnSplits
public abstract Map<SplitAndKey,LocalhostSplit> readOnSplits() throws IOException
- Throws:
IOException
-
-