Examples of nextID()


Examples of com.facebook.LinkBench.distributions.AccessDistributions.AccessDistribution.nextID()

      dist = nodeDeleteDist;
      break;
    default:
      throw new RuntimeException("Unknown value for type: " + type);
    }
    long newid1 = dist.nextID(rng, previousId1);
    // Distribution responsible for generating number in range
    assert((newid1 >= startid1) && (newid1 < maxid1));
    if (Level.TRACE.isGreaterOrEqual(debuglevel)) {
      logger.trace("id1 generated = " + newid1 +
         " for access distribution: " + dist.getClass().getName() + ": " +
View Full Code Here

Examples of com.hazelcast.multimap.MultiMapContainer.nextId()

        this.index = index;
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        recordId = container.nextId();
        MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
        Collection<MultiMapRecord> coll = container.getOrCreateMultiMapWrapper(dataKey).getCollection(false);
        if (index == -1) {
            response = coll.add(record);
        } else {
View Full Code Here

Examples of com.hazelcast.multimap.MultiMapContainer.nextId()

        }
        MultiMapWrapper wrapper = getOrCreateCollectionWrapper();

        final boolean isLocal = getResponseHandler().isLocal();
        final MultiMapResponse multiMapResponse = new MultiMapResponse(wrapper.getCollection(isLocal));
        multiMapResponse.setNextRecordId(container.nextId());
        multiMapResponse.setTxVersion(wrapper.incrementAndGetVersion());
        response = multiMapResponse;
    }

    public WaitNotifyKey getWaitKey() {
View Full Code Here

Examples of com.hazelcast.multimap.MultiMapContainer.nextId()

        this.index = index;
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        recordId = container.nextId();
        MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
        Collection<MultiMapRecord> coll = container.getOrCreateMultiMapWrapper(dataKey).getCollection(false);
        if (index == -1) {
            response = coll.add(record);
        } else {
View Full Code Here

Examples of com.hazelcast.multimap.impl.MultiMapContainer.nextId()

        }
        MultiMapWrapper wrapper = getCollectionWrapper();
        final boolean isLocal = getResponseHandler().isLocal();
        Collection<MultiMapRecord> collection = wrapper == null ? null : wrapper.getCollection(isLocal);
        final MultiMapResponse multiMapResponse = new MultiMapResponse(collection, getValueCollectionType(container));
        multiMapResponse.setNextRecordId(container.nextId());
        response = multiMapResponse;
    }

    public WaitNotifyKey getWaitKey() {
        return new LockWaitNotifyKey(new DefaultObjectNamespace(MultiMapService.SERVICE_NAME, name), dataKey);
View Full Code Here

Examples of com.hazelcast.multimap.impl.MultiMapContainer.nextId()

        this.index = index;
    }

    public void run() throws Exception {
        MultiMapContainer container = getOrCreateContainer();
        recordId = container.nextId();
        MultiMapRecord record = new MultiMapRecord(recordId, isBinary() ? value : toObject(value));
        Collection<MultiMapRecord> coll = container.getOrCreateMultiMapWrapper(dataKey).getCollection(false);
        if (index == -1) {
            response = coll.add(record);
        } else {
View Full Code Here

Examples of com.taobao.metamorphosis.utils.IdWorker.nextId()

        assertEquals(2048, store2.getMinOffset());

        final IdWorker idWorker = new IdWorker(0);
        final PutCommand cmd1 = new PutCommand(topic, partition, "hello".getBytes(), null, 0, 0);
        final PutCommand cmd2 = new PutCommand(topic, partition, "world".getBytes(), null, 0, 0);
        store1.append(idWorker.nextId(), cmd1, new AppendCallback() {

            @Override
            public void appendComplete(final Location location) {
                assertEquals(2048, location.getOffset());
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.database.idassigner.StandardIDPool.nextID()

    public void testAllocationTimeout() {
        final MockIDAuthority idauth = new MockIDAuthority(10000);
        idauth.setDelayAcquisition(5000);
        StandardIDPool pool = new StandardIDPool(idauth, 1, Integer.MAX_VALUE, 4000, 0.1);
        try {
            pool.nextID();
            fail();
        } catch (TitanException e) {

        }
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.database.idassigner.StandardIDPool.nextID()

        MockIDAuthority idauth = new MockIDAuthority(200);
        int maxID = 10000;
        StandardIDPool pool = new StandardIDPool(idauth, 0, maxID, 2000, 0.2);
        for (int i = 1; i < maxID * 2; i++) {
            try {
                long id = pool.nextID();
                assertTrue(id <= maxID);
            } catch (IDPoolExhaustedException e) {
                assertEquals(maxID + 1, i);
                break;
            }
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.database.idassigner.StandardIDPool.nextID()

        int maxID = 10000;
        MockIDAuthority idauth = new MockIDAuthority(200, maxID + 1);
        StandardIDPool pool = new StandardIDPool(idauth, 0, Integer.MAX_VALUE, 2000, 0.2);
        for (int i = 1; i < maxID * 2; i++) {
            try {
                long id = pool.nextID();
                assertTrue(id <= maxID);
            } catch (IDPoolExhaustedException e) {
                assertEquals(maxID + 1, i);
                break;
            }
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.