Enum Class SessionMode
- All Implemented Interfaces:
Serializable
,Comparable<SessionMode>
,Constable
Session
modes.
The three SessionMode
values correspond to the three layers of abstraction in Permazen.
In order from bottom to top these are:
- The key/value database layer, providing
KVDatabase
andKVTransaction
and represented byKEY_VALUE
- The core API database layer, providing
Database
andTransaction
and represented byCORE_API
- The Permazen Java layer, providing
Permazen
andPermazenTransaction
and represented byPERMAZEN
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine whether the core API (e.g.,Transaction
) is available in this mode.boolean
Determine whether the Permazen Java API (e.g.,PermazenTransaction
) based on aPermazen
instance is available in this mode.static SessionMode
Returns the enum constant of this class with the specified name.static SessionMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
KEY_VALUE
Permazen key/value database mode.This is the lowest level CLI mode, where only the raw
byte[]
key/value store is available. This mode provides aKVTransaction
, but noTransaction
orPermazenTransaction
.- See Also:
-
CORE_API
Permazen Core API mode.Supports access to low level schema information, core API "objects" and fields, but no Java-specific operations. This mode provides a
KVTransaction
andTransaction
, but noPermazenTransaction
.Schema information may be provided either by a schema XML file or by
@PermazenType
-annotated Java model classes; however, in the latter case these classes will be otherwise ignored.In this mode, database objects are represented by
ObjId
's andenum
values byEnumValue
's. -
PERMAZEN
Permazen Java mode.Provides database access through standard Java model objects and transaction access via
PermazenTransaction
. Requires and provides aPermazen
instance and its associated Java model classes.In this mode, database objects are represented by Java model class instances and
enum
values by corresponding Java modelEnum
class instances.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
hasPermazen
public boolean hasPermazen()Determine whether the Permazen Java API (e.g.,PermazenTransaction
) based on aPermazen
instance is available in this mode.- Returns:
- true if the Permazen Java API is available
-
hasCoreAPI
public boolean hasCoreAPI()Determine whether the core API (e.g.,Transaction
) is available in this mode.- Returns:
- true if the core API is available
-