org.apithefire.sql.h2
Enum FileLock

java.lang.Object
  extended by java.lang.Enum<FileLock>
      extended by org.apithefire.sql.h2.FileLock
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FileLock>

public enum FileLock
extends java.lang.Enum<FileLock>

A database file locking.

Author:
Chew Boon Aik
See Also:
Database File Locking

Enum Constant Summary
FILE
          A watchdog thread to protect the database file.
NO
          No locking.
SOCKET
          Opens a server socket.
 
Method Summary
protected  java.lang.String getParameterValue()
           
static FileLock valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FileLock[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NO

public static final FileLock NO
No locking.


FILE

public static final FileLock FILE
A watchdog thread to protect the database file. The watchdog reads the lock file each second.


SOCKET

public static final FileLock SOCKET
Opens a server socket. The socket method does not require reading the lock file every second. The socket method should only be used if the database files are only accessed by the one (and always the same) computer.

Method Detail

values

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

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

valueOf

public static FileLock valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getParameterValue

protected java.lang.String getParameterValue()


Copyright © 2008. All Rights Reserved.