mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-02 21:03:34 +03:00
25 lines
533 B
Java
25 lines
533 B
Java
package fixtures;
|
|||
|
|
|
||
|
|
class Restates {
|
||
|
|
|
||
|
|
void run(Registry registry, Job job) {
|
||
|
|
// Clear the registry
|
||
|
|
registry.clear();
|
||
|
|
|
||
|
|
// Sanitize filename
|
||
|
|
String safeFilename = sanitizeFilename(job.originalFilename());
|
||
|
|
|
||
|
|
// Wait for the worker to drain before clearing, or an in-flight job
|
||
|
|
// re-registers its temp file after the sweep.
|
||
|
|
registry.awaitQuiescence();
|
||
|
|
}
|
||
|
|
|
||
|
|
// ---------- Internal helpers ----------
|
||
|
|
|
||
|
|
// Types
|
||
|
|
private enum Mode {
|
||
|
|
FAST,
|
||
|
|
SAFE
|
||
|
|
}
|
||
|
|
}
|