Package com.taobao.metamorphosis.utils

Examples of com.taobao.metamorphosis.utils.LongSequenceGenerator


        this.idGenerator = new IdGenerator();
        this.remotingClient = EasyMock.createMock(RemotingClient.class);
        this.sessionId = this.idGenerator.generateId();
        this.session = new MockSession(this.sessionId);
        this.context =
                new TransactionContext(this.remotingClient, null, this.session, new LongSequenceGenerator(), 0,
                    DEFAULT_REQ_TIMEOUT);
        this.context.setUniqueQualifier(UNIQUE_QUALIFIER);
        OpaqueGenerator.resetOpaque();
    }
View Full Code Here


    public void testIsSameRM() throws Exception {
        final String serverUrl = "meta://localhost:8123";
        this.context.setServerUrl(serverUrl);

        final TransactionContext ctx2 =
                new TransactionContext(this.remotingClient, null, this.session, new LongSequenceGenerator(), 0,
                    DEFAULT_REQ_TIMEOUT);
        ctx2.setServerUrl(serverUrl);
        assertTrue(this.context.isSameRM(ctx2));
        this.replay();
    }
View Full Code Here

        this.sessionId = sessionId;
        this.messageSessionFactory = messageSessionFactory;
        this.remotingClient = remotingClient;
        this.partitionSelector = partitionSelector;
        this.producerZooKeeper = producerZooKeeper;
        this.localTxIdGenerator = new LongSequenceGenerator();

        // this.ordered = ordered;
    }
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.utils.LongSequenceGenerator

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.