public enum JournalOperatingMode extends Enum<JournalOperatingMode>
Title: JournalOperatingMode.java
Description: A mechanism for kicking a server from normal
(Journal-Creating) mode, to disabled (Read-Only) mode. Any
CreatorJournalEntry must call
enforceCurrentMode() before performing an
operation that might modify the repository.
| Modifier and Type | Method and Description |
|---|---|
static void |
enforceCurrentMode()
If a modifying operation is attempted while we are in Read-Only mode,
throw an exception to prevent it.
|
static Object |
getMode()
Get the current mode.
|
static void |
setMode(JournalOperatingMode mode)
Set the current mode.
|
static JournalOperatingMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JournalOperatingMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JournalOperatingMode NORMAL
public static final JournalOperatingMode READ_ONLY
public static JournalOperatingMode[] values()
for (JournalOperatingMode c : JournalOperatingMode.values()) System.out.println(c);
public static JournalOperatingMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic static void setMode(JournalOperatingMode mode)
public static Object getMode()
public static void enforceCurrentMode()
throws ServerException
ServerException - to prevent a modifying operation in Read-Only mode.Copyright © 2013 DuraSpace. All Rights Reserved.