Autopsy
4.19.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Inherits Runnable.
Public Member Functions | |
final void | run () |
final Future<?> | submit () |
Protected Member Functions | |
AbstractNodePropertySheetTask (T node, PropertyChangeListener listener) | |
abstract PropertyChangeEvent | computePropertyValue (T node) throws Exception |
Static Private Member Functions | |
static Future<?> | submitTask (AbstractNodePropertySheetTask<?> task) |
Private Attributes | |
final WeakReference< PropertyChangeListener > | weakListenerRef |
final WeakReference< T > | weakNodeRef |
Static Private Attributes | |
static final ExecutorService | executor = Executors.newFixedThreadPool(THREAD_POOL_SIZE, new ThreadFactoryBuilder().setNameFormat("node-background-task-%d").build()) |
static final Logger | LOGGER = Logger.getLogger(AbstractContentNode.class.getName()) |
static final Integer | THREAD_POOL_SIZE = 10 |
An abstract base class for background tasks needed to compute values for the property sheet of an AbstractNode.
The results of the computation are returned by firing a PropertyChangeEvent and the run method has an exception firewall with logging. These features relieve the AbstractNode from having to create a thread to block on the get() method of the task Future.
Only weak references to the AbstractNode and its PropertyChangeListener are held prior to task execution so that a queued task does not interfere with garbage collection if the node has been destroyed by the NetBeans framework.
A thread pool with descriptively named threads (node-background-task-N) is provided for executing instances of the tasks.
Definition at line 49 of file AbstractNodePropertySheetTask.java.
|
protected |
Constructs an abstract base class for background tasks needed to compute values for the property sheet of an AbstractNode.
The results of the computation are returned by firing a PropertyChangeEvent and the run method has an exception firewall with logging. These features relieve the AbstractNode from having to create a thread to block on the get() method of the task Future.
Only weak references to the AbstractNode and its PropertyChangeListener are held prior to task execution so that a queued task does not interfere with garbage collection if the node has been destroyed by the NetBeans framework.
A thread pool with descriptively named threads (node-background-task-N) is provided for executing instances of the tasks.
node | The node. |
listener | A property change listener for the node. |
Definition at line 91 of file AbstractNodePropertySheetTask.java.
|
abstractprotected |
Computes the values for the property sheet of an AbstractNode. The results of the computation are returned as a PropertyChangeEvent which is fired to the PropertyChangeEventListener of the node.
IMPORTANT: Implementations of this method should check for cancellation by calling Thread.currentThread().isInterrupted() at appropriate intervals.
node | The AbstractNode. |
Referenced by org.sleuthkit.autopsy.datamodel.utils.AbstractNodePropertySheetTask< AbstractNode >.run().
final void org.sleuthkit.autopsy.datamodel.utils.AbstractNodePropertySheetTask< T extends AbstractNode >.run | ( | ) |
Definition at line 122 of file AbstractNodePropertySheetTask.java.
final Future<?> org.sleuthkit.autopsy.datamodel.utils.AbstractNodePropertySheetTask< T extends AbstractNode >.submit | ( | ) |
Submits this task to the ExecutorService for the thread pool.
Definition at line 117 of file AbstractNodePropertySheetTask.java.
|
staticprivate |
Submits a task to compute values for the property sheet of an AbstractNode to a thread pool dedicated to such tasks with descriptively named threads (node-background-task-N).
task | The task. |
Definition at line 67 of file AbstractNodePropertySheetTask.java.
Referenced by org.sleuthkit.autopsy.datamodel.utils.AbstractNodePropertySheetTask< AbstractNode >.submit().
|
staticprivate |
Definition at line 53 of file AbstractNodePropertySheetTask.java.
|
staticprivate |
Definition at line 51 of file AbstractNodePropertySheetTask.java.
|
staticprivate |
Definition at line 52 of file AbstractNodePropertySheetTask.java.
|
private |
Definition at line 55 of file AbstractNodePropertySheetTask.java.
|
private |
Definition at line 54 of file AbstractNodePropertySheetTask.java.
Copyright © 2012-2021 Basis Technology. Generated on: Thu Sep 30 2021
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.