CursorConfig (Sleepycat Software, Inc. - Berkeley DB Java API)
Keywords: com.sleepycat.db.CursorConfig class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 4.3.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.db
Class CursorConfig

    java.lang.Object
      com.sleepycat.db.CursorConfig

All Implemented Interfaces:
  Cloneable

public class CursorConfig
extends Object
implements Cloneable

Specify the attributes of database cursor. An instance created with the default constructor is initialized with the system's default settings.

Field Summary
`static CursorConfig` | `DEFAULT` Default configuration used if null is passed to methods that create a cursor.
`static CursorConfig` | `DEGREE_2` A convenience instance to configure a cursor for degree 2 isolation.
`static CursorConfig` | `DIRTY_READ` A convenience instance to configure read operations performed by the cursor to return modified but not yet committed data.
`static CursorConfig` | `WRITECURSOR` A convenience instance to specify the Concurrent Data Store environment cursor will be used to update the database.

Constructor Summary
`CursorConfig()` An instance created using the default constructor is initialized with the system's default settings.

Method Summary
`boolean` | `getDegree2()` Return if the cursor is configured for degree 2 isolation.
`boolean` | `getDirtyRead()` Return if read operations performed by the cursor are configured to return modified but not yet committed data.
`boolean` | `getWriteCursor()` Return if the Concurrent Data Store environment cursor will be used to update the database.
`void` | `setDegree2(boolean degree2)` Configure the cursor for degree 2 isolation.
`void` | `setDirtyRead(boolean dirtyRead)` Configure read operations performed by the cursor to return modified but not yet committed data.
`void` | `setWriteCursor(boolean writeCursor)` Specify the Concurrent Data Store environment cursor will be used to update the database.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT

    public static final CursorConfig DEFAULT

  Default configuration used if null is passed to methods that create a cursor.

### DIRTY_READ

    public static final CursorConfig DIRTY_READ

  A convenience instance to configure read operations performed by the cursor to return modified but not yet committed data.

### DEGREE_2

    public static final CursorConfig DEGREE_2

  A convenience instance to configure a cursor for degree 2 isolation.

  This ensures the stability of the current data item read by this cursor but permits data read by this cursor to be modified or deleted prior to the commit of the transaction for this cursor.

### WRITECURSOR

    public static final CursorConfig WRITECURSOR

  A convenience instance to specify the Concurrent Data Store environment cursor will be used to update the database.

  The underlying Berkeley DB database environment must have been configured as a Concurrent Data Store environment.

Constructor Detail

### CursorConfig

    public CursorConfig()

  An instance created using the default constructor is initialized with the system's default settings.

Method Detail

### setDirtyRead

    public void setDirtyRead(boolean dirtyRead)

  Configure read operations performed by the cursor to return modified but not yet committed data.

  Parameters:
    `dirtyRead` - If true, configure read operations performed by the cursor to return modified but not yet committed data.

### getDirtyRead

    public boolean getDirtyRead()

  Return if read operations performed by the cursor are configured to return modified but not yet committed data.

  Returns:
    If read operations performed by the cursor are configured to return modified but not yet committed data.

### setDegree2

    public void setDegree2(boolean degree2)

  Configure the cursor for degree 2 isolation.

  This ensures the stability of the current data item read by this cursor but permits data read by this cursor to be modified or deleted prior to the commit of the transaction for this cursor.

  Parameters:
    `degree2` - If true, configure the cursor for degree 2 isolation.

### getDegree2

    public boolean getDegree2()

  Return if the cursor is configured for degree 2 isolation.

  Returns:
    If the cursor is configured for degree 2 isolation.

### setWriteCursor

    public void setWriteCursor(boolean writeCursor)

  Specify the Concurrent Data Store environment cursor will be used to update the database.

  Parameters:
    `writeCursor` - If true, specify the Concurrent Data Store environment cursor will be used to update the database.

### getWriteCursor

    public boolean getWriteCursor()

  Return if the Concurrent Data Store environment cursor will be used to update the database.

  Returns:
    If the Concurrent Data Store environment cursor will be used to update the database.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 4.3.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.