Skip to content
Snippets Groups Projects
Commit a75f32c1 authored by Guylaine Prat's avatar Guylaine Prat
Browse files

Add the possibility to suspend and resume the dump.

Fixes #377
parent 02f25ea4
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,9 @@ public class DumpManager { ...@@ -48,6 +48,9 @@ public class DumpManager {
/** Dump file (default initial value is null, i.e. nothing is dumped). */ /** Dump file (default initial value is null, i.e. nothing is dumped). */
private static final ThreadLocal<Dump> DUMP = new ThreadLocal<Dump>(); private static final ThreadLocal<Dump> DUMP = new ThreadLocal<Dump>();
/** Boolean to check if the dump is suspended. */
private static boolean isSuspended = false;
/** Private constructor for utility class. /** Private constructor for utility class.
*/ */
private DumpManager() { private DumpManager() {
...@@ -81,11 +84,23 @@ public class DumpManager { ...@@ -81,11 +84,23 @@ public class DumpManager {
} }
} }
/** Suspend the dump.
*/
public static void suspend() {
isSuspended = true;
}
/** Resume the dump.
*/
public static void resume() {
isSuspended = false;
}
/** Check if dump is active for this thread. /** Check if dump is active for this thread.
* @return true if dump is active for this thread * @return true if dump is active for this thread
*/ */
public static boolean isActive() { public static boolean isActive() {
return DUMP.get() != null; return DUMP.get() != null && !isSuspended;
} }
/** Dump DEM cell data. /** Dump DEM cell data.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment