org.apache.jcs.auxiliary.disk.jdbc
Class TableState

java.lang.Object
  extended by org.apache.jcs.auxiliary.disk.jdbc.TableState
All Implemented Interfaces:
java.io.Serializable

public class TableState
extends java.lang.Object
implements java.io.Serializable

This is used by various elements of the JDBC disk cache to indicate the status of a table. The MySQL disk cache, for instance, marks the status as optimizing when a scheduled optimization is taking place. This allows the cache to balk rather than block during long running optimizations.

Author:
Aaron Smuts
See Also:
Serialized Form

Field Summary
static int DELETE_RUNNING
          A potentially table locking deletion is running
static int FREE
          The table is free.
static int OPTIMIZATION_RUNNING
          A table locking optimization is running.
 
Constructor Summary
TableState(java.lang.String tableName)
          Construct a usable table state.
 
Method Summary
 int getState()
           
 java.lang.String getTableName()
           
 void setState(int state)
           
 void setTableName(java.lang.String tableName)
           
 java.lang.String toString()
          Write out the values for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FREE

public static final int FREE
The table is free. It can be accessed and no potentially table locking jobs are running.

See Also:
Constant Field Values

DELETE_RUNNING

public static final int DELETE_RUNNING
A potentially table locking deletion is running

See Also:
Constant Field Values

OPTIMIZATION_RUNNING

public static final int OPTIMIZATION_RUNNING
A table locking optimization is running.

See Also:
Constant Field Values
Constructor Detail

TableState

public TableState(java.lang.String tableName)
Construct a usable table state.

Parameters:
tableName -
Method Detail

setTableName

public void setTableName(java.lang.String tableName)
Parameters:
tableName - The tableName to set.

getTableName

public java.lang.String getTableName()
Returns:
Returns the tableName.

setState

public void setState(int state)
Parameters:
state - The state to set.

getState

public int getState()
Returns:
Returns the state.

toString

public java.lang.String toString()
Write out the values for debugging purposes.

Overrides:
toString in class java.lang.Object
Returns:
String


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.