Search in sources :

Example 6 with DefaultPinpointClientFactory

use of com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory in project pinpoint by naver.

the class SpanClientFactoryProvider method get.

public PinpointClientFactory get() {
    if (!"TCP".equalsIgnoreCase(thriftTransportConfig.getSpanDataSenderTransportType())) {
        return null;
    }
    PinpointClientFactory pinpointClientFactory = new DefaultPinpointClientFactory(channelFactoryProvider.get(), spanStatConnectTimer.get());
    pinpointClientFactory.setWriteTimeoutMillis(1000 * 3);
    pinpointClientFactory.setRequestTimeoutMillis(1000 * 5);
    int writeBufferHighWaterMark = getByteSize(thriftTransportConfig.getSpanDataSenderWriteBufferHighWaterMark(), ByteSizeUnit.MEGA_BYTES.toBytesSizeAsInt(16));
    int writeBufferLowWaterMark = getByteSize(thriftTransportConfig.getSpanDataSenderWriteBufferLowWaterMark(), ByteSizeUnit.MEGA_BYTES.toBytesSizeAsInt(8));
    if (writeBufferLowWaterMark > writeBufferHighWaterMark) {
        logger.warn("must be writeBufferHighWaterMark({}) >= writeBufferLowWaterMark({})", writeBufferHighWaterMark, writeBufferLowWaterMark);
        writeBufferLowWaterMark = writeBufferHighWaterMark;
    }
    pinpointClientFactory.setWriteBufferHighWaterMark(writeBufferHighWaterMark);
    pinpointClientFactory.setWriteBufferLowWaterMark(writeBufferLowWaterMark);
    return pinpointClientFactory;
}
Also used : DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory)

Example 7 with DefaultPinpointClientFactory

use of com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory in project pinpoint by naver.

the class PinpointRPCTestUtils method createClientFactory.

public static DefaultPinpointClientFactory createClientFactory(Map<String, Object> param, MessageListener messageListener) {
    DefaultPinpointClientFactory clientFactory = new DefaultPinpointClientFactory();
    clientFactory.setConnectTimeout(100);
    clientFactory.setProperties(param);
    clientFactory.addStateChangeEventListener(LoggingStateChangeEventListener.INSTANCE);
    if (messageListener != null) {
        clientFactory.setMessageListener(messageListener);
    }
    return clientFactory;
}
Also used : DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory)

Example 8 with DefaultPinpointClientFactory

use of com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory in project pinpoint by naver.

the class TcpDataSenderReconnectTest method createPinpointClientFactory.

private PinpointClientFactory createPinpointClientFactory() {
    PinpointClientFactory clientFactory = new DefaultPinpointClientFactory();
    clientFactory.setWriteTimeoutMillis(1000 * 3);
    clientFactory.setRequestTimeoutMillis(1000 * 5);
    clientFactory.setProperties(Collections.<String, Object>emptyMap());
    return clientFactory;
}
Also used : DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory) DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory)

Example 9 with DefaultPinpointClientFactory

use of com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory in project pinpoint by naver.

the class TcpDataSenderTest method createPinpointClientFactory.

private PinpointClientFactory createPinpointClientFactory() {
    PinpointClientFactory clientFactory = new DefaultPinpointClientFactory();
    clientFactory.setWriteTimeoutMillis(1000 * 3);
    clientFactory.setRequestTimeoutMillis(1000 * 5);
    clientFactory.setProperties(Collections.<String, Object>emptyMap());
    return clientFactory;
}
Also used : DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory)

Example 10 with DefaultPinpointClientFactory

use of com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory in project pinpoint by naver.

the class StreamChannelManagerTest method createSocketFactory.

private PinpointClientFactory createSocketFactory(MessageListener messageListener, ServerStreamChannelMessageListener serverStreamChannelMessageListener) {
    PinpointClientFactory clientFactory = new DefaultPinpointClientFactory();
    clientFactory.setMessageListener(messageListener);
    clientFactory.setServerStreamChannelMessageListener(serverStreamChannelMessageListener);
    return clientFactory;
}
Also used : DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory) DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory)

Aggregations

DefaultPinpointClientFactory (com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory)13 PinpointClientFactory (com.navercorp.pinpoint.rpc.client.PinpointClientFactory)11 AgentInformation (com.navercorp.pinpoint.profiler.AgentInformation)2 PinpointClient (com.navercorp.pinpoint.rpc.client.PinpointClient)1 ClusterOption (com.navercorp.pinpoint.rpc.cluster.ClusterOption)1 PinpointServerAcceptor (com.navercorp.pinpoint.rpc.server.PinpointServerAcceptor)1 HashMap (java.util.HashMap)1 Logger (org.apache.logging.log4j.Logger)1