當前位置: 首頁>>代碼示例>>Java>>正文


Java Database.getDatabaseName方法代碼示例

本文整理匯總了Java中com.sleepycat.je.Database.getDatabaseName方法的典型用法代碼示例。如果您正苦於以下問題:Java Database.getDatabaseName方法的具體用法?Java Database.getDatabaseName怎麽用?Java Database.getDatabaseName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.sleepycat.je.Database的用法示例。


在下文中一共展示了Database.getDatabaseName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BdbPersistentQueue

import com.sleepycat.je.Database; //導入方法依賴的package包/類
/**
 * 構造函數,傳入BDB數據庫
 * 
 * @param db
 * @param valueClass
 * @param classCatalog
 */
public BdbPersistentQueue(Database db,Class<E> valueClass,StoredClassCatalog classCatalog){
    this.queueDb=db;
    this.dbName=db.getDatabaseName();
    headIndex=new AtomicLong(0);
    tailIndex=new AtomicLong(0);
    bindDatabase(queueDb,valueClass,classCatalog);
}
 
開發者ID:tiglabs,項目名稱:jsf-core,代碼行數:15,代碼來源:BdbPersistentQueue.java

示例2: BdbPendingQueue

import com.sleepycat.je.Database; //導入方法依賴的package包/類
/**
 * 構造函數,傳入BDB數據庫
 * 
 * @param db
 * @param valueClass
 * @param classCatalog
 */
public BdbPendingQueue(Database db,Class<E> valueClass,StoredClassCatalog classCatalog){
    this.queueDb=db;
    this.dbName=db.getDatabaseName();
    bindDatabase(queueDb,valueClass,classCatalog);
    if(!queueMap.isEmpty()){
    	System.out.println("BdbPendingQueue 已有數據,firstKey:"+queueMap.firstKey()+" lastKey:"+queueMap.lastKey());
        headIndex=new AtomicLong(queueMap.firstKey());
        tailIndex=new AtomicLong(queueMap.lastKey()+1);
    }else{
        headIndex=new AtomicLong(0);
        tailIndex=new AtomicLong(0);
    }

}
 
開發者ID:hxt168,項目名稱:webpasser,代碼行數:22,代碼來源:BdbPendingQueue.java

示例3: diff

import com.sleepycat.je.Database; //導入方法依賴的package包/類
/**
 * A mechanism for efficiently comparing two quiescent databases.
 *
 * @param db1 a valid, open Database handle
 * @param db2 a valid, open Database handle
 * @return true if the db1 and db2 are identical
 * @throws Exception
 */
public boolean diff(Database db1, Database db2)
    throws Exception {

    BlockBag bag = createBlockBag(db2);
    final boolean ret = diff(db1, bag);
    if (cfg.getVerbose()) {
        final String db1Name = db1.getDatabaseName();
        final String db2Name = db2.getDatabaseName();
        final boolean namesMatch = db1Name.equals(db2Name);
        if (ret) {
            if (namesMatch) {
                output("No differences in " + db1Name);
            } else {
                output(db1Name + " matches " + db2Name);
            }
        } else {
            if (namesMatch) {
                output("Differences in " + db1Name);
            } else {
                output(db1Name + " does not match " + db2Name);
            }
        }
    }

    /* Do the analysis for these two databases. */
    if (cfg.getDiffAnalysis() && tracker.getDiffRegions().size() != 0) {
        DiffRecordAnalyzer.doAnalysis(db1, db2, tracker, cfg.getVerbose());
    }

    return ret;
}
 
開發者ID:prat0318,項目名稱:dbms,代碼行數:40,代碼來源:LDiff.java


注:本文中的com.sleepycat.je.Database.getDatabaseName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。