com.sleepycat.je.dbi
Enum DbType

java.lang.Object
  extended by java.lang.Enum<DbType>
      extended by com.sleepycat.je.dbi.DbType
All Implemented Interfaces:
Serializable, Comparable<DbType>

public enum DbType
extends Enum<DbType>

Classifies all databases as specific internal databases or user databases. This can be thought of as a substitute for having DatabaseImpl subclasses for different types of databases. It also identifies each internal database by name.


Enum Constant Summary
ID
           
NAME
           
REP_GROUP
           
SYNC
           
USER
           
UTILIZATION
           
VLSN_MAP
           
 
Method Summary
 LN createDeletedLN(EnvironmentImpl envImpl)
          Creates a deleted LN for use in an optimization in CursorImpl.delete.
 LN createUpdatedLN(EnvironmentImpl envImpl, byte[] newData)
          Creates an updated LN for use in an optimization in CursorImpl.putCurrentAlreadyLatchedAndLocked.
 String getInternalName()
          Returns the DB name for an internal DB type.
 boolean isInternal()
          Returns true if this is an internal DB, or false if it is a user DB.
 boolean mayCreateDeletedLN()
          Returns true if createDeletedLN may be called.
 boolean mayCreateUpdatedLN()
          Returns true if createUpdatedLN may be called.
static DbType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DbType[] 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

ID

public static final DbType ID

NAME

public static final DbType NAME

UTILIZATION

public static final DbType UTILIZATION

REP_GROUP

public static final DbType REP_GROUP

VLSN_MAP

public static final DbType VLSN_MAP

SYNC

public static final DbType SYNC

USER

public static final DbType USER
Method Detail

values

public static DbType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DbType c : DbType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DbType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

isInternal

public boolean isInternal()
Returns true if this is an internal DB, or false if it is a user DB.


getInternalName

public String getInternalName()
Returns the DB name for an internal DB type.

Throws:
EnvironmentFailureException - if this is not an internal DB type.

mayCreateUpdatedLN

public boolean mayCreateUpdatedLN()
Returns true if createUpdatedLN may be called.


createUpdatedLN

public LN createUpdatedLN(EnvironmentImpl envImpl,
                          byte[] newData)
Creates an updated LN for use in an optimization in CursorImpl.putCurrentAlreadyLatchedAndLocked. Without this method it would be necessary to fetch the existing LN and call LN.modify.

Throws:
EnvironmentFailureException - if this is not allowed.

mayCreateDeletedLN

public boolean mayCreateDeletedLN()
Returns true if createDeletedLN may be called.


createDeletedLN

public LN createDeletedLN(EnvironmentImpl envImpl)
Creates a deleted LN for use in an optimization in CursorImpl.delete. Without this method it would be necessary to fetch the existing LN and call LN.delete.

Throws:
EnvironmentFailureException - if this is not allowed.


Copyright (c) 2004-2012 Oracle. All rights reserved.