当前位置: 首页>>代码示例>>Java>>正文


Java DatabaseEntry.getSize方法代码示例

本文整理汇总了Java中com.sleepycat.je.DatabaseEntry.getSize方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseEntry.getSize方法的具体用法?Java DatabaseEntry.getSize怎么用?Java DatabaseEntry.getSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sleepycat.je.DatabaseEntry的用法示例。


在下文中一共展示了DatabaseEntry.getSize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEntryFromStoreWithID

import com.sleepycat.je.DatabaseEntry; //导入方法依赖的package包/类
@Override
public ConceptVectorRecord getEntryFromStoreWithID(Integer id) {
  ConceptVectorRecord record = new ConceptVectorRecord(id);

  DatabaseEntry theKey = new DatabaseEntry();
  integerBinding.objectToEntry(record.getID(), theKey);
  DatabaseEntry theValue = new DatabaseEntry();
  try {
    groundhog.get(null, theKey, theValue, LockMode.DEFAULT);
  } catch (DatabaseException e) {
    e.printStackTrace();
  }
  if (theValue.getSize() != 0) {
    record.setConceptVector((ConceptVector) recordDatabaseBinding.entryToObject(theValue));
    return record;
  }
  else {
    return null;
  }
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:21,代码来源:Groundhog.java

示例2: getEntryFromStoreWithID

import com.sleepycat.je.DatabaseEntry; //导入方法依赖的package包/类
@Override
protected ConceptToConceptVectorRecordIndexEntry getEntryFromStoreWithID(Integer id) {
  ConceptToConceptVectorRecordIndexEntry conceptToRecordIndexEntry = null;
  try {
    DatabaseEntry databaseKey = new DatabaseEntry();
    DatabaseEntry databaseValue = new DatabaseEntry();
    myIntegerBinding.objectToEntry(id, databaseKey);
    conceptToConceptVectorIndexStore.get(null, databaseKey, databaseValue, LockMode.DEFAULT);
    if (databaseValue.getSize() != 0) {
      conceptToRecordIndexEntry = (ConceptToConceptVectorRecordIndexEntry) myDataBinding.entryToObject(databaseValue);
    }
  } catch (DatabaseException e) {
    e.printStackTrace();
  }

  return conceptToRecordIndexEntry;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:18,代码来源:ConceptToRecordIndex.java

示例3: getEntryFromStoreWithID

import com.sleepycat.je.DatabaseEntry; //导入方法依赖的package包/类
@Override
protected SortedIntListSet getEntryFromStoreWithID(Integer id) {
  SortedIntListSet result = null;
  try {
    DatabaseEntry databaseKey = new DatabaseEntry();
    DatabaseEntry databaseValue = new DatabaseEntry();
    myIntegerBinding.objectToEntry(id, databaseKey);
    integerToSetOfIntegersStore.get(null, databaseKey, databaseValue, LockMode.DEFAULT);
    if (databaseValue.getSize() != 0) {
      result = (SortedIntListSet) myDataBinding.entryToObject(databaseValue);
    }
  } catch (DatabaseException e) {
    e.printStackTrace();
  }

  return result;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:18,代码来源:IntegerSetStore.java

示例4: getEntryFromStoreWithID

import com.sleepycat.je.DatabaseEntry; //导入方法依赖的package包/类
@Override
protected SortedIntList2IntMap getEntryFromStoreWithID(Integer id) {
  SortedIntList2IntMap result = null;
  try {
    DatabaseEntry databaseKey = new DatabaseEntry();
    DatabaseEntry databaseValue = new DatabaseEntry();
    myIntegerBinding.objectToEntry(id, databaseKey);
    cooccurrenceDB.get(null, databaseKey, databaseValue, LockMode.DEFAULT);
    if (databaseValue.getSize() != 0) {
      result = (SortedIntList2IntMap) myDataBinding.entryToObject(databaseValue);
    }
  } catch (DatabaseException e) {
    e.printStackTrace();
  }

  return result;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:18,代码来源:CooccurrenceDatabase.java

示例5: getEntryFromStoreWithID

import com.sleepycat.je.DatabaseEntry; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected V getEntryFromStoreWithID(K id) {
  DatabaseEntry theKey = new DatabaseEntry();
  keyBinding.objectToEntry(id, theKey);
  DatabaseEntry theValue = new DatabaseEntry();
  try {
    database.get(null, theKey, theValue, LockMode.DEFAULT);
  } catch (DatabaseException e) {
    e.printStackTrace();
  }
  if (theValue.getSize() != 0) 
    return (V) valueBinding.entryToObject(theValue);
  else
    return notInDatabase;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:17,代码来源:SleepyCatStoreCache.java

示例6: get

import com.sleepycat.je.DatabaseEntry; //导入方法依赖的package包/类
@Override
public CloneableRecord get(ExecutionContext context, CloneableRecord key, IndexMeta indexMeta, String dbName) {

    DatabaseEntry keyEntry = new DatabaseEntry();
    DatabaseEntry valueEntry = new DatabaseEntry();
    keyEntry.setData(indexCodecMap.get(indexMeta.getName()).getKey_codec().encode(key));
    OperationStatus status = getDatabase(dbName).get(context.getTransaction() == null ? null : ((JE_Transaction) context.getTransaction()).txn,
        keyEntry,
        valueEntry,
        LockMode.DEFAULT);
    if (OperationStatus.SUCCESS != status) {
        return null;
    }
    if (valueEntry.getSize() != 0) {
        return indexCodecMap.get(indexMeta.getName()).getValue_codec().decode(valueEntry.getData());
    } else {
        return null;
    }
}
 
开发者ID:loye168,项目名称:tddl5,代码行数:20,代码来源:JE_Table.java

示例7: entryToObject

import com.sleepycat.je.DatabaseEntry; //导入方法依赖的package包/类
private Object entryToObject(DatabaseEntry entry) throws Exception {
    int len = entry.getSize();
    if (len == 0) {
        return null;
    } else {
        // return KryoSerializer.read(entry.getData());     // #+# outcommented: What's KryoSerializer?
         return kryoserializer.deserialize(entry.getData(), DatabaseEntry.class);     // #+# ADDED
    }
}
 
开发者ID:hypergraphdb,项目名称:hypergraphdb,代码行数:10,代码来源:BerkeleyDBStore.java


注:本文中的com.sleepycat.je.DatabaseEntry.getSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。