本文整理汇总了Java中org.hsqldb.lib.IntKeyHashMap类的典型用法代码示例。如果您正苦于以下问题:Java IntKeyHashMap类的具体用法?Java IntKeyHashMap怎么用?Java IntKeyHashMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntKeyHashMap类属于org.hsqldb.lib包,在下文中一共展示了IntKeyHashMap类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: collectAsteriskPos
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* is a private helper for replaceAsterisksInStatement, to avoid some code duplication
*/
private void collectAsteriskPos(final Select select,
IntKeyHashMap asteriskPositions) {
if (select.asteriskPositions == null) {
return;
}
Iterator asterisks = select.asteriskPositions.keySet().iterator();
while (asterisks.hasNext()) {
int pos = asterisks.nextInt();
asteriskPositions.put(pos, select.asteriskPositions.get(pos));
}
// The following is to guarantee the invariant of this class, that the |astersiskPositions|
// member of the various Select instances properly describe the occurances
// of Expression.ASTERISK in the statement.
// Since we are going to replace all those asterisks, we also need to reset the various
// |astersiskPositions| instances, which is best done here were all non-null
// Select's need to pass by.
select.asteriskPositions = null;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:View.java
示例2: StatementManager
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* Constructs a new instance of <code>CompiledStatementManager</code>.
*
* @param database the Database instance for which this object is to
* manage compiled statement objects.
*/
StatementManager(Database database) {
this.database = database;
schemaMap = new IntKeyHashMap();
csidMap = new LongKeyHashMap();
useMap = new LongKeyIntValueHashMap();
next_cs_id = 0;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:15,代码来源:StatementManager.java
示例3: getDBNameArray
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* Returns a map of n values from server.dbname.n values to database names
* from the properties object.
*/
private IntKeyHashMap getDBNameArray() {
final String prefix = ServerProperties.sc_key_dbname + ".";
final int prefixLen = prefix.length();
IntKeyHashMap idToAliasMap = new IntKeyHashMap();
Enumeration en = serverProperties.propertyNames();
for (; en.hasMoreElements(); ) {
String key = (String) en.nextElement();
if (!key.startsWith(prefix)) {
continue;
}
int dbNumber;
try {
dbNumber = Integer.parseInt(key.substring(prefixLen));
} catch (NumberFormatException e1) {
printWithThread("malformed database enumerator: " + key);
continue;
}
String alias = serverProperties.getProperty(key).toLowerCase();
if (!aliasSet.add(alias)) {
printWithThread("duplicate alias: " + alias);
}
Object existing = idToAliasMap.put(dbNumber, alias);
if (existing != null) {
printWithThread("duplicate database enumerator: " + key);
}
}
return idToAliasMap;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:44,代码来源:Server.java
示例4: StatementManager
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* Constructs a new instance of <code>CompiledStatementManager</code>.
*
* @param database the Database instance for which this object is to
* manage compiled statement objects.
*/
StatementManager(Database database) {
this.database = database;
schemaMap = new IntKeyHashMap();
sqlLookup = new LongKeyHashMap();
csidMap = new LongKeyHashMap();
sessionUseMap = new LongKeyHashMap();
useMap = new LongKeyIntValueHashMap();
next_cs_id = 0;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:17,代码来源:StatementManager.java
示例5: getDBNameArray
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* Returns a map of n values from server.dbname.n values to database names
* from the properties object.
*/
private IntKeyHashMap getDBNameArray() {
final String prefix = ServerProperties.sc_key_dbname + ".";
final int prefixLen = prefix.length();
IntKeyHashMap idToAliasMap = new IntKeyHashMap();
Enumeration en = serverProperties.propertyNames();
for (; en.hasMoreElements(); ) {
String key = (String) en.nextElement();
if (!key.startsWith(prefix)) {
continue;
}
int dbNumber;
try {
dbNumber = Integer.parseInt(key.substring(prefixLen));
} catch (NumberFormatException e1) {
printWithThread("maformed database enumerator: " + key);
continue;
}
String alias = serverProperties.getProperty(key).toLowerCase();
if (!aliasSet.add(alias)) {
printWithThread("duplicate alias: " + alias);
}
Object existing = idToAliasMap.put(dbNumber, alias);
if (existing != null) {
printWithThread("duplicate database enumerator: " + key);
}
}
return idToAliasMap;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:44,代码来源:Server.java
示例6: CompiledStatementManager
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* Constructs a new instance of <code>CompiledStatementManager</code>.
*
* @param database the Database instance for which this object is to
* manage compiled statement objects.
*/
CompiledStatementManager(Database database) {
this.database = database;
sqlMap = new IntValueHashMap();
sqlLookup = new IntKeyHashMap();
csidMap = new IntKeyHashMap();
sessionMap = new IntKeyHashMap();
useMap = new IntKeyIntValueHashMap();
next_cs_id = 0;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:17,代码来源:CompiledStatementManager.java
示例7: CompiledStatementManager
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* Constructs a new instance of <code>CompiledStatementManager</code>.
*
* @param database the Database instance for which this object is to
* manage compiled statement objects.
*/
CompiledStatementManager(Database database) {
this.database = database;
schemaMap = new IntKeyHashMap();
sqlLookup = new IntKeyHashMap();
csidMap = new IntKeyHashMap();
sessionUseMap = new IntKeyHashMap();
useMap = new IntKeyIntValueHashMap();
next_cs_id = 0;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:17,代码来源:CompiledStatementManager.java
示例8: DataSpaceManagerBlocks
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
public DataSpaceManagerBlocks(DataFileCache dataFileCache) {
cache = dataFileCache;
dataFileScale = cache.getDataFileScale();
fileBlockSize = cache.database.logger.getDataFileSpaces() * 1024
* 1024;
fileBlockItemCount = fileBlockSize / dataFileScale;
bitmapIntSize = fileBlockItemCount / 32;
bitmapStorageSize = BitMapCachedObject.fileSizeFactor * bitmapIntSize;
if (bitmapStorageSize < fixedBlockSizeUnit) {
bitmapStorageSize = fixedBlockSizeUnit;
}
ba = new BlockAccessor();
spaceManagerList = new IntKeyHashMap();
emptySpaceList = new IntIndex(32, false);
//
directorySpaceManager = new TableSpaceManagerBlocks(this,
tableIdDirectory, fileBlockSize, 16, dataFileScale, 0);
defaultSpaceManager = new TableSpaceManagerBlocks(this,
tableIdDefault, fileBlockSize,
cache.database.logger.propMaxFreeBlocks, dataFileScale,
cache.database.logger.propMinReuse);
spaceManagerList.put(tableIdDirectory, directorySpaceManager);
spaceManagerList.put(tableIdDefault, defaultSpaceManager);
//
rootStore = new BlockObjectStore(cache, directorySpaceManager,
IntArrayCachedObject.class,
IntArrayCachedObject.fileSizeFactor
* blockSize, blockSize);
directoryStore =
new BlockObjectStore(cache, directorySpaceManager,
DirectoryBlockCachedObject.class,
DirectoryBlockCachedObject.fileSizeFactor
* blockSize, blockSize);
bitMapStore = new BlockObjectStore(cache, directorySpaceManager,
BitMapCachedObject.class,
bitmapStorageSize, bitmapIntSize);
if (cache.spaceManagerPosition == 0) {
initialiseNewSpaceDirectory();
cache.spaceManagerPosition = rootBlock.getPos() * dataFileScale;
} else {
long pos = cache.spaceManagerPosition / dataFileScale;
rootBlock = (IntArrayCachedObject) rootStore.get(pos, true);
// integrity check
if (getBlockIndexLimit() == 0) {
throw Error.error(ErrorCode.FILE_IO_ERROR);
}
initialiseSpaceList();
initialiseTableSpace(directorySpaceManager);
initialiseTableSpace(defaultSpaceManager);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:63,代码来源:DataSpaceManagerBlocks.java
示例9: setDBInfoArrays
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* Initialises the database attributes lists from the server properties object.
*/
private void setDBInfoArrays() {
IntKeyHashMap dbNumberMap = getDBNameArray();
int maxDatabases = dbNumberMap.size();
if (serverProperties.isPropertyTrue(
ServerProperties.sc_key_remote_open_db)) {
int max = serverProperties.getIntegerProperty(
ServerProperties.sc_key_max_databases,
ServerConstants.SC_DEFAULT_MAX_DATABASES);
if (maxDatabases < max) {
maxDatabases = max;
}
}
dbAlias = new String[maxDatabases];
dbPath = new String[dbAlias.length];
dbType = new String[dbAlias.length];
dbID = new int[dbAlias.length];
dbActionSequence = new long[dbAlias.length];
dbProps = new HsqlProperties[dbAlias.length];
Iterator it = dbNumberMap.keySet().iterator();
for (int i = 0; it.hasNext(); ) {
int dbNumber = it.nextInt();
String path = getDatabasePath(dbNumber, true);
if (path == null) {
printWithThread("missing database path: "
+ dbNumberMap.get(dbNumber));
continue;
}
HsqlProperties dbURL = DatabaseURL.parseURL(path, false, false);
if (dbURL == null) {
printWithThread("malformed database path: " + path);
continue;
}
dbAlias[i] = (String) dbNumberMap.get(dbNumber);
dbPath[i] = dbURL.getProperty("database");
dbType[i] = dbURL.getProperty("connection_type");
dbProps[i] = dbURL;
i++;
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:56,代码来源:Server.java
示例10: DataSpaceManagerBlocks
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
public DataSpaceManagerBlocks(DataFileCache dataFileCache,
int fileBlockSizeScale) {
cache = dataFileCache;
dataFileScale = cache.getDataFileScale();
fileBlockSize = fileBlockSizeScale * 1024 * 1024;
fileBlockItemCount = fileBlockSize / dataFileScale;
bitmapIntSize = fileBlockItemCount / 32;
bitmapStorageSize = BitMapCachedObject.fileSizeFactor * bitmapIntSize;
if (bitmapStorageSize < fixedBlockSizeUnit) {
bitmapStorageSize = fixedBlockSizeUnit;
}
ba = new BlockAccessor();
spaceManagerList = new IntKeyHashMap();
//
directorySpaceManager = new TableSpaceManagerBlocks(this,
tableIdDirectory, fileBlockSize, 16, dataFileScale);
defaultSpaceManager = new TableSpaceManagerBlocks(this,
tableIdDefault, fileBlockSize, freeItemCacheSize,
dataFileScale);
spaceManagerList.put(tableIdDirectory, directorySpaceManager);
spaceManagerList.put(tableIdDefault, defaultSpaceManager);
//
rootStore = new BlockObjectStore(cache, directorySpaceManager,
IntArrayCachedObject.class,
IntArrayCachedObject.fileSizeFactor
* blockSize, blockSize);
directoryStore =
new BlockObjectStore(cache, directorySpaceManager,
DirectoryBlockCachedObject.class,
DirectoryBlockCachedObject.fileSizeFactor
* blockSize, blockSize);
bitMapStore = new BlockObjectStore(cache, directorySpaceManager,
BitMapCachedObject.class,
bitmapStorageSize, bitmapIntSize);
if (cache.spaceManagerPosition == 0) {
initNewSpaceDirectory();
cache.spaceManagerPosition = rootBlock.getPos() * dataFileScale;
cache.setFileModified();
} else {
long pos = cache.spaceManagerPosition / dataFileScale;
rootBlock = (IntArrayCachedObject) rootStore.get(pos, true);
// integrity check
if (getBlockIndexLimit() < 2) {
throw Error.error(ErrorCode.FILE_IO_ERROR);
}
spaceIdSequence = getMaxSpaceId() + 1;
initialiseTableSpace(directorySpaceManager);
initialiseTableSpace(defaultSpaceManager);
}
firstDirectory = getDirectory(0, true);
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:66,代码来源:DataSpaceManagerBlocks.java
示例11: replaceAsterisksInStatement
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* replaces all asterisks in our statement with the actual column list
*
* This way, we ensure what is required by the standard: a view returns a result
* which reflects the structure of the underlying tables at the *time of the definition
* of the view.
*/
private void replaceAsterisksInStatement() throws HsqlException {
IntKeyHashMap asteriskPositions = new IntKeyHashMap();
// asterisk positions in sub queries
for (int i = 0; i < viewSubqueries.length; ++i) {
// collect the occurances of asterisks in the statement
Select subSelect = viewSubqueries[i].select;
collectAsteriskPos(subSelect, asteriskPositions);
// the same for all (possible) UNION SELECTs of the sub select
if (subSelect.unionArray != null) {
// start with index 1, not 0 - the first select is the one already covered by subSelect
for (int u = 1; u < subSelect.unionArray.length; ++u) {
collectAsteriskPos(subSelect.unionArray[u],
asteriskPositions);
}
}
}
int[] positions = new int[asteriskPositions.size()];
Iterator it = asteriskPositions.keySet().iterator();
for (int i = 0; i < positions.length; i++) {
positions[i] = it.nextInt();
}
ArrayUtil.sortArray(positions);
StringBuffer expandedStatement = new StringBuffer();
int lastPos = 0;
String segment;
for (int i = 0; i < positions.length; i++) {
int pos = positions[i];
String colList = (String) asteriskPositions.get(pos);
if (colList == null) {
continue;
}
segment = statement.substring(lastPos, pos);
lastPos = statement.indexOf("*", pos) + 1;
expandedStatement.append(segment);
expandedStatement.append(' ');
expandedStatement.append(colList);
expandedStatement.append(' ');
}
segment = statement.substring(lastPos, statement.length());
expandedStatement.append(segment);
statement = expandedStatement.toString();
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:67,代码来源:View.java
示例12: TextCache
import org.hsqldb.lib.IntKeyHashMap; //导入依赖的package包/类
/**
* The source string for a cached table is evaluated and the parameters
* are used to open the source file.<p>
*
* Settings are used in this order: (1) settings specified in the
* source string for the table (2) global database settings in
* *.properties file (3) program defaults
*/
TextCache(Table table, String name) {
super(table.database, name);
this.table = table;
uncommittedCache = new IntKeyHashMap();
}
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:16,代码来源:TextCache.java
注:本文中的org.hsqldb.lib.IntKeyHashMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论