public class DurabilityEditor extends PropertyEditorSupport
PropertyEditor for the Durability class.
The string value must be one of the following tokens or parse-able by
Durability.valueOf(String) method.
Valid tokens are:
NONEACKFSYNCJOURNALMAJORITY
FSYNC, JOURNAL, and MAJORITY all use
30000 milliseconds for the wait time.
This editor will also parses a full MongoDB URI to extract the specified
Durability. See the Connection String URI Format documentation for information on
constructing a MongoDB URI.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_WAIT_TIME_MS
The default wait time for tokenized durabilities: 30000 ms.
|
static Set<String> |
MONGODB_URI_FIELDS
The set of fields used to determine a Durability from a MongoDB URI.
|
| Constructor and Description |
|---|
DurabilityEditor()
Creates a new DurabilityEditor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setAsText(String durabilityString) |
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditorpublic static final int DEFAULT_WAIT_TIME_MS
public void setAsText(String durabilityString) throws IllegalArgumentException
Overridden to parse a string to a Durability.
setAsText in interface PropertyEditorsetAsText in class PropertyEditorSupportIllegalArgumentException - If the string cannot be parsed into a Durability.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.