org.xworker.thingManagers
类 FileMonitor
java.lang.Object
java.util.TimerTask
org.xworker.thingManagers.FileMonitor
- 所有已实现的接口:
- java.lang.Runnable
public class FileMonitor
- extends java.util.TimerTask
监控事物文件是否被改动或者删除。
- 作者:
- zyx
| 从类 java.util.TimerTask 继承的方法 |
cancel, scheduledExecutionTime |
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
private static FileMonitor instance
files
java.util.Map<FileMonitor.FileEntry,java.lang.Long> files
things
java.util.Map<java.lang.String,FileMonitor.FileEntry> things
timer
java.util.Timer timer
world
World world
FileMonitor
private FileMonitor()
getInstance
public static FileMonitor getInstance()
addFile
public void addFile(java.lang.String path,
Thing thing,
java.io.File file)
getFileEntry
public FileMonitor.FileEntry getFileEntry(java.lang.String path)
updateLastModified
public void updateLastModified(FileMonitor.FileEntry entry,
long lastmodified)
run
public void run()
- 指定者:
- 接口
java.lang.Runnable 中的 run - 指定者:
- 类
java.util.TimerTask 中的 run
changeRemoved
private void changeRemoved(Thing thing)