Examples of nextID()


Examples of org.neo4j.kernel.impl.nioneo.store.IdGenerator.nextId()

        int sizePerJump = 1000;
        IdGeneratorFactory factory = new JumpingIdGeneratorFactory( sizePerJump );
        IdGenerator generator = factory.get( IdType.NODE );
        for ( int i = 0; i < sizePerJump/2; i++ )
        {
            assertEquals( (long)i, generator.nextId() );
        }
       
        for ( int i = 0; i < sizePerJump-1; i++ )
        {
            long expected = 0x100000000L-sizePerJump/2+i;
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.IdGenerator.nextId()

            long expected = 0x100000000L-sizePerJump/2+i;
            if ( expected >= 0xFFFFFFFFL )
            {
                expected++;
            }
            assertEquals( expected, generator.nextId() );
        }

        for ( int i = 0; i < sizePerJump; i++ )
        {
            assertEquals( 0x200000000L-sizePerJump/2+i, generator.nextId() );
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.IdGenerator.nextId()

            assertEquals( expected, generator.nextId() );
        }

        for ( int i = 0; i < sizePerJump; i++ )
        {
            assertEquals( 0x200000000L-sizePerJump/2+i, generator.nextId() );
        }

        for ( int i = 0; i < sizePerJump; i++ )
        {
            assertEquals( 0x300000000L-sizePerJump/2+i, generator.nextId() );
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.IdGenerator.nextId()

            assertEquals( 0x200000000L-sizePerJump/2+i, generator.nextId() );
        }

        for ( int i = 0; i < sizePerJump; i++ )
        {
            assertEquals( 0x300000000L-sizePerJump/2+i, generator.nextId() );
        }
    }
   
    @Test
    public void testOffsettedFileChannel() throws Exception
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore.nextId()

    }

    private int createNewPropertyIndex( String stringKey )
    {
        PropertyIndexStore idxStore = getPropertyIndexStore();
        int keyId = (int) idxStore.nextId();
        PropertyIndexRecord record = new PropertyIndexRecord( keyId );
        record.setInUse( true );
        record.setCreated();
        int nameId = idxStore.nextNameId();
        record.setNameId( nameId );
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore.nextId()

    }

    private int createNewPropertyIndex( String stringKey )
    {
        PropertyIndexStore idxStore = getPropertyIndexStore();
        int keyId = (int) idxStore.nextId();
        PropertyIndexRecord record = new PropertyIndexRecord( keyId );
        record.setInUse( true );
        record.setCreated();
        int nameId = idxStore.nextNameId();
        record.setNameId( nameId );
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyIndexStore.nextId()

    }
   
    private int createNewPropertyIndex( String stringKey )
    {
        PropertyIndexStore idxStore = getPropertyIndexStore();
        int keyId = (int) idxStore.nextId();
        PropertyIndexRecord record = new PropertyIndexRecord( keyId );
        record.setInUse( true );
        record.setCreated();
        int keyBlockId = idxStore.nextKeyBlockId();
        record.setKeyBlockId( keyBlockId );
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyStore.nextId()

        {
            return Record.NO_NEXT_PROPERTY.intValue();
        }
        PropertyStore propStore = getPropertyStore();
        List<PropertyRecord> propRecords = new ArrayList<PropertyRecord>();
        PropertyRecord currentRecord = new PropertyRecord( propStore.nextId() );
        currentRecord.setInUse( true );
        currentRecord.setCreated();
        propRecords.add( currentRecord );
        for ( Entry<String, Object> entry : properties.entrySet() )
        {
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyStore.nextId()

            if ( currentRecord.size() + block.getSize() > PropertyType.getPayloadSize() )
            {
                // Here it means the current block is done for
                PropertyRecord prevRecord = currentRecord;
                // Create new record
                long propertyId = propStore.nextId();
                currentRecord = new PropertyRecord( propertyId );
                currentRecord.setInUse( true );
                currentRecord.setCreated();
                // Set up links
                prevRecord.setNextProp( propertyId );
View Full Code Here

Examples of org.neo4j.kernel.impl.nioneo.store.PropertyStore.nextId()

        {
            return Record.NO_NEXT_PROPERTY.intValue();
        }
        PropertyStore propStore = getPropertyStore();
        List<PropertyRecord> propRecords = new ArrayList<PropertyRecord>();
        PropertyRecord currentRecord = new PropertyRecord( propStore.nextId() );
        currentRecord.setInUse( true );
        currentRecord.setCreated();
        propRecords.add( currentRecord );
        for ( Entry<String,Object> entry : properties.entrySet() )
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.