Package jade.domain
Class DFHSQLKB
- java.lang.Object
-
- jade.domain.KBManagement.KB
-
- jade.domain.KBManagement.DBKB
-
- jade.domain.DFDBKB
-
- jade.domain.DFHSQLKB
-
public class DFHSQLKB extends DFDBKB
DFHSQLKBrealizes a knowledge base used by the DF which stores its content in an HSQL database, running in the same VM. The SQL commands are optimized for the HSQL database.- Author:
- Roland Mungenast - Profactor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jade.domain.KBManagement.DBKB
DBKB.ConnectionWrapper, DBKB.EmptyKBIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCACHE_SCALEprotected static StringCACHE_SIZE_SCALEprotected static StringGC_INTERVAL-
Fields inherited from class jade.domain.DFDBKB
DEFAULT_LONGVARCHAR_TYPE
-
Fields inherited from class jade.domain.KBManagement.DBKB
cleanTables, driver
-
-
Constructor Summary
Constructors Constructor Description DFHSQLKB(int maxResultLimit, boolean cleanTables)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConnectioncreateDBConnection(String url, String user, String passwd)protected voidcreateTable(Statement stmt, String name, String[] entries)protected StringgetLongVarCharType()Returns the name of the SQL type used in the database to represent very long strings.-
Methods inherited from class jade.domain.DFDBKB
createDFTables, createIndices, createTable, dropDFTables, dropTable, getGUID, getHashValue, getSubscriptions, initConnectionWrapper, insertSingle, iteratorSingle, prepDBStr, removeSingle, replace, searchSingle, setup, subscribeSingle, tableExists, unsubscribeSingle
-
Methods inherited from class jade.domain.KBManagement.DBKB
getConnectionWrapper, insert, iterator, remove, search, subscribe, unsubscribe
-
Methods inherited from class jade.domain.KBManagement.KB
deregister, register, search, setLeaseManager, setSubscriptionResponder
-
-
-
-
Field Detail
-
CACHE_SCALE
protected static final String CACHE_SCALE
- See Also:
- Constant Field Values
-
CACHE_SIZE_SCALE
protected static final String CACHE_SIZE_SCALE
- See Also:
- Constant Field Values
-
GC_INTERVAL
protected static final String GC_INTERVAL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DFHSQLKB
public DFHSQLKB(int maxResultLimit, boolean cleanTables) throws SQLExceptionConstructor- Parameters:
maxResultLimit- JADE internal limit for the number of maximum search results.cleanTables- specifies whether the KB should delete all existing tables for the DF at startup- Throws:
SQLException- if a database access error occurs
-
-
Method Detail
-
createDBConnection
protected Connection createDBConnection(String url, String user, String passwd) throws SQLException
- Overrides:
createDBConnectionin classDBKB- Throws:
SQLException
-
getLongVarCharType
protected String getLongVarCharType()
Description copied from class:DFDBKBReturns the name of the SQL type used in the database to represent very long strings.- Overrides:
getLongVarCharTypein classDFDBKB
-
createTable
protected void createTable(Statement stmt, String name, String[] entries) throws SQLException
- Throws:
SQLException
-
-