@Test public void testLineUdpTimestamp() throws ServerConfigurationException, JsonException { Properties properties = new Properties(); properties.setProperty("http.enabled", "false"); properties.setProperty("line.udp.timestamp", ""); PropServerConfiguration configuration = new PropServerConfiguration("root", properties); Assert.assertSame(LineProtoNanoTimestampAdapter.INSTANCE, configuration.getLineUdpReceiverConfiguration().getTimestampAdapter()); properties.setProperty("line.udp.timestamp", "n"); configuration = new PropServerConfiguration("root", properties); Assert.assertSame(LineProtoNanoTimestampAdapter.INSTANCE, configuration.getLineUdpReceiverConfiguration().getTimestampAdapter()); properties.setProperty("line.udp.timestamp", "u"); configuration = new PropServerConfiguration("root", properties); Assert.assertSame(LineProtoMicroTimestampAdapter.INSTANCE, configuration.getLineUdpReceiverConfiguration().getTimestampAdapter()); properties.setProperty("line.udp.timestamp", "ms"); configuration = new PropServerConfiguration("root", properties); Assert.assertSame(LineProtoMilliTimestampAdapter.INSTANCE, configuration.getLineUdpReceiverConfiguration().getTimestampAdapter()); properties.setProperty("line.udp.timestamp", "s"); configuration = new PropServerConfiguration("root", properties); Assert.assertSame(LineProtoSecondTimestampAdapter.INSTANCE, configuration.getLineUdpReceiverConfiguration().getTimestampAdapter()); properties.setProperty("line.udp.timestamp", "m"); configuration = new PropServerConfiguration("root", properties); Assert.assertSame(LineProtoMinuteTimestampAdapter.INSTANCE, configuration.getLineUdpReceiverConfiguration().getTimestampAdapter()); properties.setProperty("line.udp.timestamp", "h"); configuration = new PropServerConfiguration("root", properties); Assert.assertSame(LineProtoHourTimestampAdapter.INSTANCE, configuration.getLineUdpReceiverConfiguration().getTimestampAdapter()); }
@Override public LineUdpReceiverConfiguration getLineUdpReceiverConfiguration() { return lineUdpReceiverConfiguration; }
PropServerConfiguration implements ServerConfiguration { @Override public LineUdpReceiverConfiguration getLineUdpReceiverConfiguration() { return lineUdpReceiverConfiguration; } }
PropServerConfiguration implements ServerConfiguration { @Override public LineUdpReceiverConfiguration getLineUdpReceiverConfiguration() { return lineUdpReceiverConfiguration; } PropServerConfiguration(String root, Properties properties); }
PropServerConfiguration implements ServerConfiguration { @Override public LineUdpReceiverConfiguration getLineUdpReceiverConfiguration() { return lineUdpReceiverConfiguration; } PropServerConfiguration(String root, Properties properties); @Override CairoConfiguration getCairoConfiguration(); @Override HttpServerConfiguration getHttpServerConfiguration(); @Override LineUdpReceiverConfiguration getLineUdpReceiverConfiguration(); @Override LineTcpReceiverConfiguration getLineTcpReceiverConfiguration(); @Override WorkerPoolConfiguration getWorkerPoolConfiguration(); @Override PGWireConfiguration getPGWireConfiguration(); }
PropServerConfiguration implements ServerConfiguration { @Override public LineUdpReceiverConfiguration getLineUdpReceiverConfiguration() { return lineUdpReceiverConfiguration; } PropServerConfiguration(String root, Properties properties); @Override CairoConfiguration getCairoConfiguration(); @Override HttpServerConfiguration getHttpServerConfiguration(); @Override LineUdpReceiverConfiguration getLineUdpReceiverConfiguration(); @Override LineTcpReceiverConfiguration getLineTcpReceiverConfiguration(); @Override WorkerPoolConfiguration getWorkerPoolConfiguration(); @Override PGWireConfiguration getPGWireConfiguration(); static final String CONFIG_DIRECTORY; }