|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<StoreAccess>
org.magnos.data.StoreAccess
public enum StoreAccess
A stores access imposes restrictions on the store and its permanent medium if one exists.
| Enum Constant Summary | |
|---|---|
Exclusive
A store with read and write access. |
|
ReadOnly
A store with only read access. |
|
ReadWrite
A store with read and write access. |
|
| Field Summary | |
|---|---|
boolean |
canLock
Whether the store should acquire exclisive access to any persisted medium. |
boolean |
canRead
Whether the store can have data read from it. |
boolean |
canWrite
Whether the store can have data written to it. |
StoreAccess |
next
The next access if this state could not be applied. |
| Method Summary | |
|---|---|
void |
tryRead(Store store)
Checks if this access can read on the given store, if not an access exception is thrown. |
void |
tryWrite(Store store)
Checks if this access can writen on the given store, if not an access exception is thrown. |
static StoreAccess |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static StoreAccess[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final StoreAccess ReadOnly
public static final StoreAccess ReadWrite
public static final StoreAccess Exclusive
| Field Detail |
|---|
public final boolean canRead
public final boolean canWrite
public final boolean canLock
public final StoreAccess next
| Method Detail |
|---|
public static StoreAccess[] values()
for (StoreAccess c : StoreAccess.values()) System.out.println(c);
public static StoreAccess valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic void tryRead(Store store)
store - The store to try to read on.public void tryWrite(Store store)
store - The store to try to write on.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||