Package com.swoval.files
Interface FileTreeDataViews.CacheObserver<T>
-
- Type Parameters:
T- the type for theFileTreeDataViews.Entrydata
- Enclosing class:
- FileTreeDataViews
public static interface FileTreeDataViews.CacheObserver<T>Provides callbacks to run when different types of file events are detected by the cache.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCreate(FileTreeDataViews.Entry<T> newEntry)Callback to fire when a new path is created.voidonDelete(FileTreeDataViews.Entry<T> oldEntry)Callback to fire when a path is deleted.voidonError(java.io.IOException exception)Callback to fire when an error is encountered generating while updating a path.voidonUpdate(FileTreeDataViews.Entry<T> oldEntry, FileTreeDataViews.Entry<T> newEntry)Callback to fire when a path is modified.
-
-
-
Method Detail
-
onCreate
void onCreate(FileTreeDataViews.Entry<T> newEntry)
Callback to fire when a new path is created.- Parameters:
newEntry- theFileTreeDataViews.Entryfor the newly created file
-
onDelete
void onDelete(FileTreeDataViews.Entry<T> oldEntry)
Callback to fire when a path is deleted.- Parameters:
oldEntry- theFileTreeDataViews.Entryfor the deleted.
-
onUpdate
void onUpdate(FileTreeDataViews.Entry<T> oldEntry, FileTreeDataViews.Entry<T> newEntry)
Callback to fire when a path is modified.- Parameters:
oldEntry- theFileTreeDataViews.Entryfor the updated pathnewEntry- theFileTreeDataViews.Entryfor the deleted path
-
onError
void onError(java.io.IOException exception)
Callback to fire when an error is encountered generating while updating a path.- Parameters:
exception- The exception thrown by the computation
-
-