Package com.hp.hpl.jena.tdb.base.record

Examples of com.hp.hpl.jena.tdb.base.record.RecordFactory


        {
            System.err.printf("Can't determine record size for %s\n",indexName) ;
            return ;
        }
       
        RecordFactory recordFactory = null ;
        BPlusTreeParams bptParams = null ;
        BlockMgr blkMgrNodes ;
        BlockMgr blkMgrRecords ;
        int blockSize = SystemTDB.BlockSize ;
        Iterator<Record> iterator ;
View Full Code Here


        this.colMap = colMap ;
        this.rowLength = itemsPerRow*16 + itemsPerRow ;   // Length in bytes of a row.
        this.rowBlockSize = rowBlockSize ;
        this.buffer = new byte[rowLength*rowBlockSize] ;
        this.idx = -1 ;
        this.recordFactory = new RecordFactory(itemsPerRow*SystemTDB.SizeOfNodeId, 0) ;
    }
View Full Code Here

   
    private static void bptCopy(RangeIndex bpt1, RangeIndex bpt2, String label)
    {
        ProgressLogger monitor = new ProgressLogger(log, label, tickQuantum, superTick) ;
        monitor.start() ;
        RecordFactory rf = bpt1.getRecordFactory() ;
       
        Iterator<Record> iter1 = bpt1.iterator() ;
        long counter = 0 ;
        // Use the same slot each time.
        Record r2 = rf.create() ;
       
        for ( ; iter1.hasNext(); )
        {
            counter++ ;
            Record r = iter1.next() ;
View Full Code Here

        // Also flush cache every so often => block writes (but not sequential so boring).
        int readCacheSize = 10 ;
        int writeCacheSize = 100 ;

        int blockSize = SystemTDB.BlockSize ;
        RecordFactory recordFactory = new RecordFactory(dftKeyLength, dftValueLength) ;
       
        int order = BPlusTreeParams.calcOrder(blockSize, recordFactory) ;
        BPlusTreeParams bptParams = new BPlusTreeParams(order, recordFactory) ;

        int blockSizeNodes = blockSize ;
View Full Code Here

public class RecordLib
{
    public static void main(String...argv)
    {
        RecordFactory rf = new RecordFactory(8,4) ;
        Record r = rf.create() ;
        Bytes.setLong(0x123456789ABCDEF0L, r.getKey()) ;
        Bytes.setInt(0x22334455, r.getValue()) ;
        ColumnMap cMap = new ColumnMap("XYAB", "BYXA") ;
        Record r2 = copyRecord(rf, r, cMap) ;
        System.out.println(r) ;
View Full Code Here

    public static Record copyRecord(RecordFactory recordFactory, Record record, ColumnMap colMap)
    {
        int kLen = record.getKey().length ;
        int vLen = record.getValue() == null ? 0 : record.getValue().length ;
        if ( recordFactory == null )
            recordFactory = new RecordFactory(kLen, vLen) ;
        int N = colMap.length() ;
        if ( kLen%N != 0 )
            throw new RecordException("Key length is not a multiple of the number of slots") ;
        int itemLen = kLen/N ;
        Record record2 = recordFactory.create() ;
View Full Code Here

            monitor03.start() ;
            String path = dsg.getLocation().getDirectoryPath() ;
            new File(path, "node2id.dat").delete() ;
            new File(path, "node2id.idn").delete() ;
           
            final RecordFactory recordFactory = new RecordFactory(LenNodeHash, SizeOfNodeId) ;
            Transform<Pair<byte[], byte[]>, Record> transformPair2Record = new Transform<Pair<byte[], byte[]>, Record>() {
                @Override public Record convert(Pair<byte[], byte[]> pair) {
                    monitor03.tick() ;
                    return recordFactory.create(pair.getLeft(), pair.getRight()) ;
                }
            };

            int order = BPlusTreeParams.calcOrder(SystemTDB.BlockSize, recordFactory) ;
            BPlusTreeParams bptParams = new BPlusTreeParams(order, recordFactory) ;
View Full Code Here

       
        oldCheckingBTree = BPlusTreeParams.CheckingTree ;
        BPlusTreeParams.CheckingTree = true ;
       
        blockSize =  4*8 // Which is 6 int records
        recordFactory = new RecordFactory(4, 0) ;
       
        bufSizeRecord = RecordBufferPage.calcRecordSize(recordFactory, blockSize) ;
        blkMgrRecords = BlockMgrFactory.createMem("BPTreeRecords", blockSize) ;
        recordBufferPageMgr = new RecordBufferPageMgr(recordFactory, blkMgrRecords) ;
       
View Full Code Here

    public final static int TestRecordLength = 4 ;
   
    public final static RecordFactory recordFactory    = new RecordFactory(TestRecordLength, 0) ;
   
    public static Record intToRecord(int v) { return intToRecord(v, recordFactory) ; }
    public static Record intToRecord(int v, int recLen) { return intToRecord(v, new RecordFactory(recLen, 0)) ; }
View Full Code Here

    }

    public static List<Record> intToRecord(int[] v) { return intToRecord(v, recordFactory) ; }

    public static List<Record> intToRecord(int[] v, int recLen)
    { return intToRecord(v, new RecordFactory(recLen, 0)) ; }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.base.record.RecordFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.