You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2007/10/20 08:39:50 UTC
[jira] Created: (IO-132) File Listener/Monitor
File Listener/Monitor
---------------------
Key: IO-132
URL: https://issues.apache.org/jira/browse/IO-132
Project: Commons IO
Issue Type: New Feature
Reporter: Niall Pemberton
Assignee: Niall Pemberton
Fix For: 1.4
Attachments: FileListener.java, FileMonitor.java, FileObserver.java
Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
>From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
There are also some changes to the API specified in JCI's fam:
1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
[1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536481 ]
Niall Pemberton commented on IO-132:
------------------------------------
Discussion on the dev list here: http://tinyurl.com/29oufy
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: JDKLoggingFileListener.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: FileObserverImpl.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: FilesystemMonitor.java
FilesystemObserver.java
FilesystemListener.java
Stephen's comment was that it seemed too much like a framework. I've re-written the implementations with a single concrete implementation of FilesystemObserver. With that refactoring and being able to use JDK 1.5 features I believe it is much more straight forward - attaching the following:
- FilesystemListener - interface which receives create/change/delete events for files/directories
- FilesystemObserver - checks the current state of a directory against what it has cached from the previous invocation and notifies listeners
- FilesystemMonitor - Runnable that invokes registered observers at a specified interval
I also have a do nothing FilesystemListenerAdaptor implementation and FilesystemObserver test case.
I'll leave this for review/comment for a while before I commit.
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
> Attachments: FilesystemListener.java, FilesystemMonitor.java, FilesystemObserver.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: FileListener.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540662 ]
Niall Pemberton commented on IO-132:
------------------------------------
In the JCI thread discussing this (see http://tinyurl.com/29oufy) Torsten wasn't keen on adding this to Commons IO - I still am, anyone else got an opinion for or against committing this?
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: FileObserverImplTestCase.java
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Fix Version/s: (was: 1.4)
AFTER-1.4
No agreement on this - so punting to post 1.4
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: AFTER-1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586116#action_12586116 ]
Niall Pemberton commented on IO-132:
------------------------------------
Added:
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/monitor/
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
> Attachments: FilesystemListener.java, FilesystemMonitor.java, FilesystemObserver.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: AbstractFileObserverTestCase.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: CollectionFileListener.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: AbstractFileObserver.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
> Attachments: AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: FileObserverImpl.java
AbstractFileObserver.java
FileListenerAdaptor.java
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: FileMonitor.java
FileObserver.java
FileListener.java
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: FileListener.java, FileMonitor.java, FileObserver.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: FileListenerAdaptor.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: JDKLoggingFileListener.java
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: CollectionFileListenerTestCase.java
CollectionFileListener.java
AbstractFileObserverTestCase.java
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (IO-132) File Listener/Monitor
Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546298 ]
Matt Benson commented on IO-132:
--------------------------------
Huge delay; my email's been _very_ backed up, but I thought this was a good idea as well.
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536483 ]
Niall Pemberton commented on IO-132:
------------------------------------
Thought I would give a quick summary of the core of this feature, which is two interfaces and four classes:
1) Interfaces
FileListener - listens for file/directory create, change and delete events
FileObserver - checks the file system for changes and notifies registered listeners (core method is checkAndNotify())
2) Implementations
FileListenerAdaptor - do nothing convenience FileListener implementation
AbstractFileObserver - basic FileObserver plumbing - checkAndNotify() not implemented
FileObserverImpl - core class providing checkAndNotify() implementation (extends AbstractFileObserver)
FileMonitor - Runnable which periodically executes checkAndNotify() of registered FileObserver
The heart of all of this is the logic in FileObserverImpl which does the main task of identifying new, modified and deleted files/directories and notifying the listeners.
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 1.4
>
> Attachments: AbstractFileObserver.java, AbstractFileObserverTestCase.java, CollectionFileListener.java, CollectionFileListenerTestCase.java, FileListener.java, FileListenerAdaptor.java, FileMonitor.java, FileObserver.java, FileObserverImpl.java, FileObserverImplTestCase.java, JDKLoggingFileListener.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: FileObserverImplTestCase.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: FileMonitor.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: FileObserver.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved IO-132.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.x)
2.0
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.0
>
> Attachments: FilesystemListener.java, FilesystemMonitor.java, FilesystemObserver.java
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-132) File Listener/Monitor
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-132:
-------------------------------
Attachment: (was: CollectionFileListenerTestCase.java)
> File Listener/Monitor
> ---------------------
>
> Key: IO-132
> URL: https://issues.apache.org/jira/browse/IO-132
> Project: Commons IO
> Issue Type: New Feature
> Reporter: Niall Pemberton
> Assignee: Niall Pemberton
> Fix For: 2.x
>
>
> Commons JCI has a "fam" (file alteration monitor) module[1] which provides a listener for file and directory create/change/delete events. I have done some work refactoring the JCI implementation and propose adding to to Commons IO. There is already an existing request/propsal to add similar functionality in IO-79 from Jim Harrington (which includes code).
> There are IMO two main differences (IMO improvements) in this implementation over exsiting JCI fam module:
> 1) It uses a matching array technique to compare previous and current directory contents which minimizes object creation
> 2) FileFilters can be specified to monitor only portions of the file system, ignoring files/directories of no interest. This is more efficient and reduces the amount of noise from un-wanted file/directory events
> From a quick look at IO-79, the above also applies to that proposal. Additionally IMO the solution in IO-79 would benefit from been broken out from the two DirectoryPoller and FilePoller artifacts.
> There are also some changes to the API specified in JCI's fam:
> 1) FileObserver (FilesystemAlterationObserver in fam) has additional init() and destroy() methods
> 2) FileMonitor (FilesystemAlterationMonitor in fam) has addObserver/removeObserver methods rather than addListener/removeListener methods. The issue (IMO) with fam is that the monitor is fixed to the FilesystemAlterationObserverImpl implementation, rather than any FilesystemAlterationObserver implementation. Also the ability to specify file filters means that there is a need to be able to add more than one observer for the same root directory.
> [1] http://svn.apache.org/repos/asf/commons/proper/jci/trunk/fam/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.