class PreferencesSerializer extends ThreadedTask<java.lang.Void,java.lang.Void,java.lang.Void> implements PreferencesFileConstants
Modifier and Type | Field and Description |
---|---|
private Mutex |
mutex
Lock for synchronization
|
private java.util.HashMap<java.lang.String,Pair<PreferenceType,java.lang.Object>> |
preferences
Preferences to serialize
|
private java.io.File |
preferencesFile
File where write XML
|
private boolean |
serializeAgain
Indicates if a new serialization is need
|
private boolean |
serializing
Indicates if we are in serializing
|
MARKUP_PREFERENCE, MARKUP_PREFERENCES, PARAMETER_NAME, PARAMETER_TYPE, PARAMETER_VALUE
Constructor and Description |
---|
PreferencesSerializer(java.io.File preferencesFile,
java.util.HashMap<java.lang.String,Pair<PreferenceType,java.lang.Object>> preferences)
Create a new instance of PreferencesSerializer
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Void |
doThreadAction(java.lang.Void parameter)
Do the serialization in separate thread
Parent documentation: Call when the turn of this thread comes. |
void |
serialize()
Serialize the preferences as soon as possible
|
protected void |
setResult(java.lang.Void result)
Call when serialization is finish
Parent documentation: Call when task is finish. |
cancel, canceled, doProgress, postProgress
private final Mutex mutex
private final java.util.HashMap<java.lang.String,Pair<PreferenceType,java.lang.Object>> preferences
private final java.io.File preferencesFile
private boolean serializeAgain
private boolean serializing
PreferencesSerializer(java.io.File preferencesFile, java.util.HashMap<java.lang.String,Pair<PreferenceType,java.lang.Object>> preferences)
preferencesFile
- Preference files where write preferencespreferences
- Preferences to serializeprotected java.lang.Void doThreadAction(java.lang.Void parameter)
doThreadAction
in class ThreadedTask<java.lang.Void,java.lang.Void,java.lang.Void>
parameter
- Unusednull
ThreadedTask.doThreadAction(java.lang.Object)
protected void setResult(java.lang.Void result)
setResult
in class ThreadedTask<java.lang.Void,java.lang.Void,java.lang.Void>
result
- UnusedThreadedTask.setResult(java.lang.Object)
public void serialize()