final class RemoveFile extends java.lang.Object implements Serviceable, java.security.PrivilegedExceptionAction<java.lang.Object>
Modifier and Type | Field and Description |
---|---|
private StorageFile |
fileToGo |
DONE, REQUEUE
Constructor and Description |
---|
RemoveFile(StorageFile fileToGo) |
Modifier and Type | Method and Description |
---|---|
int |
performWork(ContextManager context)
Do whatever it is that you want the daemon to do for you.
|
java.lang.Object |
run() |
boolean |
serviceASAP()
If this work should be done as soon as possible, then return true.
|
boolean |
serviceImmediately()
File deletion is a quick operation and typically releases substantial
amount of space very quickly, this work should be done on the
user thread.
|
private final StorageFile fileToGo
RemoveFile(StorageFile fileToGo)
public int performWork(ContextManager context) throws StandardException
Serviceable
performWork
in interface Serviceable
context
- the contextManager set up by the DaemonService. There
may or may not be the necessary context on it, depending on which other
Serviceable object it has done work for.StandardException
- Standard Derby exception policy
MT - depends on the work. Be wary of multiple DaemonService thread calling at the same time if you subscribe or enqueue multiple times.
public boolean serviceASAP()
Serviceable
MT - MT safe
serviceASAP
in interface Serviceable
public boolean serviceImmediately()
serviceImmediately
in interface Serviceable
public java.lang.Object run() throws StandardException
run
in interface java.security.PrivilegedExceptionAction<java.lang.Object>
StandardException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.