Examples of IDBlockSizer


Examples of com.thinkaurelius.titan.graphdb.database.idassigner.IDBlockSizer

        }
    }

    @Test
    public void testSimpleIDAcquisition() throws StorageException {
        final IDBlockSizer blockSizer = new InnerIDBlockSizer();
        idAuthorities[0].setIDBlockSizer(blockSizer);
        List<Long> ids = Lists.newArrayList();
        long previous = 0;
        for (int i=0;i<100;i++) {
            long[] block = idAuthorities[0].getIDBlock(0);
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.database.idassigner.IDBlockSizer

    }

    @Test
    public void testIDExhaustion() throws StorageException {
        final int chunks = 30;
        final IDBlockSizer blockSizer = new IDBlockSizer() {
            @Override
            public long getBlockSize(int partitionID) {
                return ((1l<<(idUpperBoundBitWidth-uidBitWidth))-1)/chunks;
            }
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.database.idassigner.IDBlockSizer

    @Test
    public void testMultiIDAcquisition() throws Throwable {
        final int numPartitions = 4;
        final int numAcquisitionsPerThreadPartition = 300;
        final IDBlockSizer blockSizer = new InnerIDBlockSizer();
        for (int i = 0; i < CONCURRENCY; i++) idAuthorities[i].setIDBlockSizer(blockSizer);
        final List<List<Long>> ids = new ArrayList<List<Long>>(numPartitions);
        for (int i = 0; i < numPartitions; i++) {
            ids.add(Collections.synchronizedList(new ArrayList<Long>(numAcquisitionsPerThreadPartition * CONCURRENCY)));
        }
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.