FileDocCategorySizeDatePackage
CachedConnection.javaAPI DocExample1363Mon Jun 18 20:00:00 BST 2001None

CachedConnection

public class CachedConnection extends Object

Fields Summary
private boolean
inUse
private Connection
conn
private long
lastUsed
private String
baseName
Constructors Summary
public CachedConnection()

 
    conn     = null;
    inUse    = false;
    lastUsed = System.currentTimeMillis();
    baseName = "Database";
  
public CachedConnection(Connection conn, boolean inUse)

 
    this.conn     = conn;
    this.inUse    = inUse;
    this.lastUsed = System.currentTimeMillis();
    this.baseName = "Database";
  
public CachedConnection(Connection conn, boolean inUse, String baseName)

 
    this.conn     = conn;
    this.inUse    = inUse;
    this.lastUsed = System.currentTimeMillis();
    this.baseName = baseName;
  
Methods Summary
public java.lang.StringgetBaseName()

    return baseName;
  
public java.sql.ConnectiongetConnection()

 
    return conn; 
  
public booleangetInUse()

    return inUse;
  
public longgetLastUsed()

    return lastUsed;
  
public booleanisInUse()

    return inUse;
  
public voidsetBaseName(java.lang.String baseName)

    this.baseName = baseName;
  
public voidsetConnection(java.sql.Connection conn)

 
    this.conn = conn; 
  
public voidsetInUse(boolean inUse)

    if (!inUse)
      lastUsed = System.currentTimeMillis();
    this.inUse = inUse;