Package com.taobao.metamorphosis.network

Examples of com.taobao.metamorphosis.network.MetamorphosisWireFormatType



    @Test
    public void testGetStats() throws Exception {
        ServerConfig serverConfig = new ServerConfig();
        serverConfig.setWireFormatType(new MetamorphosisWireFormatType());
        serverConfig.setPort(8199);
        RemotingServer server = RemotingFactory.bind(serverConfig);
        try {
            server.registerProcessor(StatsCommand.class, new RequestProcessor<StatsCommand>() {
View Full Code Here



    private void mockSlaveServer() throws Exception {
        final ServerConfig serverConfig = new ServerConfig();
        serverConfig.setPort(8121);
        serverConfig.setWireFormatType(new MetamorphosisWireFormatType());
        this.mockSlave = RemotingFactory.bind(serverConfig);
    }
View Full Code Here

    }


    private static RemotingServer newRemotingServer(final MetaConfig metaConfig) {
        final ServerConfig serverConfig = new ServerConfig();
        serverConfig.setWireFormatType(new MetamorphosisWireFormatType());
        serverConfig.setPort(metaConfig.getServerPort());
        final RemotingServer server = RemotingFactory.newRemotingServer(serverConfig);
        return server;
    }
View Full Code Here

        assertEquals("5",
            ZkUtils.readData(client, "/meta/brokers/topics/topic2/" + this.metaConfig.getBrokerId() + "-m"));

        // ȷ�Ϸ�����������
        final ClientConfig clientConfig = new ClientConfig();
        clientConfig.setWireFormatType(new MetamorphosisWireFormatType());
        final RemotingClient remotingClient = RemotingFactory.connect(clientConfig);
        remotingClient.connect(serverUrl);
        remotingClient.awaitReadyInterrupt(serverUrl);
        assertTrue(remotingClient.isConnected(serverUrl));
        remotingClient.stop();
View Full Code Here

        assertEquals("5",
            ZkUtils.readData(client, "/meta/brokers/topics/topic2/" + this.metaConfig.getBrokerId() + "-s0"));

        // ȷ�Ϸ�����������
        final ClientConfig clientConfig = new ClientConfig();
        clientConfig.setWireFormatType(new MetamorphosisWireFormatType());
        final RemotingClient remotingClient = RemotingFactory.connect(clientConfig);
        remotingClient.connect(serverUrl);
        remotingClient.awaitReadyInterrupt(serverUrl);
        assertTrue(remotingClient.isConnected(serverUrl));
        remotingClient.stop();
View Full Code Here

        }
        this.setConfigs(props);
        final ClientConfig clientConfig = new ClientConfig();
        // ֻʹ��1��reactor
        clientConfig.setSelectorPoolSize(1);
        clientConfig.setWireFormatType(new MetamorphosisWireFormatType());
        try {
            this.remotingClient = RemotingFactory.newRemotingClient(clientConfig);
            this.remotingClient.start();
            this.masterProcessor =
                    new SamsaCommandProcessor(metaMorphosisBroker.getStoreManager(),
View Full Code Here

            this.checkConfig(metaClientConfig);
            this.metaClientConfig = metaClientConfig;
            final ClientConfig clientConfig = new ClientConfig();
            clientConfig.setTcpNoDelay(TCP_NO_DELAY);
            clientConfig.setMaxReconnectTimes(MAX_RECONNECT_TIMES);
            clientConfig.setWireFormatType(new MetamorphosisWireFormatType());
            clientConfig.setMaxScheduleWrittenBytes(MAX_SCHEDULE_WRITTEN_BYTES);
            try {
                this.remotingClient = new RemotingClientWrapper(RemotingFactory.connect(clientConfig));
            }
            catch (final NotifyRemotingException e) {
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.network.MetamorphosisWireFormatType

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.