FileSystemSvc.I
This interface contains methods that are not normally used; mostly they are used by the FileSvc to control the firing and type of FileSystem events. If one want to make changes to the file system, use the FileSvc instead of manipulating the filesysem directly, as it will properly use this advanced interface.
One method on this interface that may be of interest is the getLock() method which, when synchronized on, will prevent events from firing, listeners from being added, and other threads calling the FileSvc (or trying to grab the lock) from proceeding with their changes.
FileSystemSvc.I
FileSystemSvc
Field Summary |
public static final int |
|
public static final int |
|
public static final int |
|
public static final int |
|
public static final int |
|
public static final int |
|
public static final int |
|
Method Summary |
public void |
|
public void |
|
public void |
|
public void |
|
public boolean |
|
public boolean |
|
Methods from interface com.bea.ide.filesystem. |
|
Field Detail |
public static final int ABORT_CHANGE
public static final int FILE_CHANGED
public static final int FILE_DELETED
public static final int FILE_NEW
public static final int FILE_WRITABLE_CHANGED
public static final int IGNORE_CHANGE
public static final int IGNORE_FUTURE_CHANGES
Method Detail |
public void finishChangeInternally(This method should be called after the application changes a file on disk. The change type is passed in as a hint for how you would like the event to be viewed by the listeners. After completion, file system events may be processed again. This method contains an implict call toURI
changedUri, int changeType,Object
state)
FileSystemSvc.IAdvanced.resumeEventProcessing()
Related Topics
FileSystemSvc.IAdvanced.resumeEventProcessing()
FileSystemEvent
public void resumeEventProcessing()This is the counterpart to the stopEventProcessing method and allows the File System Service to resume processing file system events.
Related Topics
public void startChangeInternally(URI
changedUri)
This method should be called immediately before the application
changes a file on disk.
As a side effect, this method halts all file system notifications
until finishChangeInternally is called. This method contains an implict
call to FileSystemSvc.IAdvanced.stopEventProcessing()
Related Topics
FileSystemSvc.IAdvanced.stopEventProcessing()
public void stopEventProcessing()This method allows the caller to temporarily halt file system event notifictaions. Between calls to this method and it's counterpart
FileSystemSvc.IAdvanced.resumeEventProcessing()
, Listeners are guaranteed not to fire.
This allows the caller to perform multiple changes to the file system without firing multiple
events and to protect themselves from re-entrance if their file system listener needs this.
Note that multiple calls may be made to this method. The events will resume when the corresponding number of
calls to resumeEventProcessing have been made. All calls to this method should be guaranteed to be followed
at some point by a call to resumeEventProcessing, usually in a finally block.
Related Topics
public boolean synchronize(boolean waitForListeners)This method synchronizes the file system. It waits until all outstanding file change events have been popogated to listeners and then returns. Note that it is inherently a transient state, and so no guarantees can be made about the complete state of the filesystem. However, if internal code makes a large number of modifications to the filesystem, then calls synchronize(), you are guaranteed that all changes that were committed to disk at the time of the call to synchronize() will have been propogated.
public boolean synchronize(FileSystemSvc.ISynchronizeComplete
sc)
This method synchronizes the file system. The synchronizer callback is invoked after periodically during the synchronization
loop. Callers that are waiting for a particular event to be delivered can check state to insure that their event has been
delivered.