test_class.file: agent/core/src/test/java/org/glowroot/agent/central/CentralCollectorTest.java
test_class.identifier: CentralCollectorTest
test_case.body: @Test
      public void shouldEscape() {
          assertThat(CentralCollector.escapeHostname("")).isEqualTo("");
          assertThat(CentralCollector.escapeHostname("abc")).isEqualTo("abc");
          assertThat(CentralCollector.escapeHostname("a:b:c")).isEqualTo("a:b:c");
          assertThat(CentralCollector.escapeHostname(":a:b:c:")).isEqualTo("\\:a:b:c:");
          assertThat(CentralCollector.escapeHostname("::a::b::c::"))
                  .isEqualTo("\\:\\:a:\\:b:\\:c:\\:");
          assertThat(CentralCollector.escapeHostname(":::a:::b:::c:::"))
                  .isEqualTo("\\:\\:\\:a:\\:\\:b:\\:\\:c:\\:\\:");
          assertThat(CentralCollector.escapeHostname("::::")).isEqualTo("\\:\\:\\:\\:");
  
          assertThat(CentralCollector.escapeHostname("a\\b\\c")).isEqualTo("a\\\\b\\\\c");
      }
test_case.class_method_signature: CentralCollectorTest.shouldEscape()
test_case.full_signature: @Test public void shouldEscape()
test_case.identifier: shouldEscape
test_case.invocations: isEqualTo assertThat escapeHostname isEqualTo assertThat escapeHostname isEqualTo assertThat escapeHostname isEqualTo assertThat escapeHostname isEqualTo assertThat escapeHostname isEqualTo assertThat escapeHostname isEqualTo assertThat escapeHostname isEqualTo assertThat escapeHostname
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldEscape()
focal_class.declarator: logger = LoggerFactory.getLogger(CentralCollector.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(CentralCollector.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: startupLogger = LoggerFactory.getLogger("org.glowroot")
focal_class.modifier: private static final
focal_class.original_string: private static final Logger startupLogger = LoggerFactory.getLogger("org.glowroot");
focal_class.type: Logger
focal_class.var_name: startupLogger
focal_class.declarator: SKIP_DELAY
focal_class.modifier: private static final
focal_class.original_string: private static final boolean SKIP_DELAY;
focal_class.type: boolean
focal_class.var_name: SKIP_DELAY
focal_class.declarator: agentId
focal_class.modifier: private final
focal_class.original_string: private final String agentId;
focal_class.type: String
focal_class.var_name: agentId
focal_class.declarator: collectorAddress
focal_class.modifier: private final
focal_class.original_string: private final String collectorAddress;
focal_class.type: String
focal_class.var_name: collectorAddress
focal_class.declarator: configService
focal_class.modifier: private final
focal_class.original_string: private final ConfigService configService;
focal_class.type: ConfigService
focal_class.var_name: configService
focal_class.declarator: configReadOnly
focal_class.modifier: private final
focal_class.original_string: private final boolean configReadOnly;
focal_class.type: boolean
focal_class.var_name: configReadOnly
focal_class.declarator: configSyncedFile
focal_class.modifier: private final
focal_class.original_string: private final File configSyncedFile;
focal_class.type: File
focal_class.var_name: configSyncedFile
focal_class.declarator: centralConnection
focal_class.modifier: private final
focal_class.original_string: private final CentralConnection centralConnection;
focal_class.type: CentralConnection
focal_class.var_name: centralConnection
focal_class.declarator: collectorServiceStub
focal_class.modifier: private final
focal_class.original_string: private final CollectorServiceStub collectorServiceStub;
focal_class.type: CollectorServiceStub
focal_class.var_name: collectorServiceStub
focal_class.declarator: downstreamServiceObserver
focal_class.modifier: private final
focal_class.original_string: private final DownstreamServiceObserver downstreamServiceObserver;
focal_class.type: DownstreamServiceObserver
focal_class.var_name: downstreamServiceObserver
focal_class.declarator: sharedQueryTextLimiter = new SharedQueryTextLimiter()
focal_class.modifier: private final
focal_class.original_string: private final SharedQueryTextLimiter sharedQueryTextLimiter = new SharedQueryTextLimiter();
focal_class.type: SharedQueryTextLimiter
focal_class.var_name: sharedQueryTextLimiter
focal_class.declarator: environment
focal_class.modifier: private volatile @MonotonicNonNull
focal_class.original_string: private volatile @MonotonicNonNull Environment environment;
focal_class.type: Environment
focal_class.var_name: environment
focal_class.declarator: nextAggregateDelayMillis
focal_class.modifier: private volatile
focal_class.original_string: private volatile int nextAggregateDelayMillis;
focal_class.type: int
focal_class.var_name: nextAggregateDelayMillis
focal_class.file: agent/core/src/main/java/org/glowroot/agent/central/CentralCollector.java
focal_class.identifier: CentralCollector
focal_class.interfaces: implements Collector
focal_class.class_method_signature: CentralCollector.CentralCollector(Map<String, String> properties, String collectorAddress,
              @Nullable String collectorAuthority, List<File> confDirs, boolean configReadOnly,
              LiveJvmServiceImpl liveJvmService, LiveWeavingServiceImpl liveWeavingService,
              LiveTraceRepositoryImpl liveTraceRepository, AgentConfigUpdater agentConfigUpdater,
              ConfigService configService)
focal_class.full_signature: public  CentralCollector(Map<String, String> properties, String collectorAddress,
              @Nullable String collectorAuthority, List<File> confDirs, boolean configReadOnly,
              LiveJvmServiceImpl liveJvmService, LiveWeavingServiceImpl liveWeavingService,
              LiveTraceRepositoryImpl liveTraceRepository, AgentConfigUpdater agentConfigUpdater,
              ConfigService configService)
focal_class.identifier: CentralCollector
focal_class.modifiers: public
focal_class.parameters: (Map<String, String> properties, String collectorAddress,
              @Nullable String collectorAuthority, List<File> confDirs, boolean configReadOnly,
              LiveJvmServiceImpl liveJvmService, LiveWeavingServiceImpl liveWeavingService,
              LiveTraceRepositoryImpl liveTraceRepository, AgentConfigUpdater agentConfigUpdater,
              ConfigService configService)
focal_class.signature:  CentralCollector(Map<String, String> properties, String collectorAddress,
              @Nullable String collectorAuthority, List<File> confDirs, boolean configReadOnly,
              LiveJvmServiceImpl liveJvmService, LiveWeavingServiceImpl liveWeavingService,
              LiveTraceRepositoryImpl liveTraceRepository, AgentConfigUpdater agentConfigUpdater,
              ConfigService configService)
focal_class.class_method_signature: CentralCollector.init(List<File> confDirs, final Environment environment, AgentConfig agentConfig,
              final AgentConfigUpdater agentConfigUpdater)
focal_class.full_signature: @Override public void init(List<File> confDirs, final Environment environment, AgentConfig agentConfig,
              final AgentConfigUpdater agentConfigUpdater)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (List<File> confDirs, final Environment environment, AgentConfig agentConfig,
              final AgentConfigUpdater agentConfigUpdater)
focal_class.return: void
focal_class.signature: void init(List<File> confDirs, final Environment environment, AgentConfig agentConfig,
              final AgentConfigUpdater agentConfigUpdater)
focal_class.class_method_signature: CentralCollector.collectAggregates(AggregateReader aggregateReader)
focal_class.full_signature: @Override public void collectAggregates(AggregateReader aggregateReader)
focal_class.identifier: collectAggregates
focal_class.modifiers: @Override public
focal_class.parameters: (AggregateReader aggregateReader)
focal_class.return: void
focal_class.signature: void collectAggregates(AggregateReader aggregateReader)
focal_class.class_method_signature: CentralCollector.collectGaugeValues(List<GaugeValue> gaugeValues)
focal_class.full_signature: @Override public void collectGaugeValues(List<GaugeValue> gaugeValues)
focal_class.identifier: collectGaugeValues
focal_class.modifiers: @Override public
focal_class.parameters: (List<GaugeValue> gaugeValues)
focal_class.return: void
focal_class.signature: void collectGaugeValues(List<GaugeValue> gaugeValues)
focal_class.class_method_signature: CentralCollector.collectTrace(TraceReader traceReader)
focal_class.full_signature: @Override public void collectTrace(TraceReader traceReader)
focal_class.identifier: collectTrace
focal_class.modifiers: @Override public
focal_class.parameters: (TraceReader traceReader)
focal_class.return: void
focal_class.signature: void collectTrace(TraceReader traceReader)
focal_class.class_method_signature: CentralCollector.log(LogEvent logEvent)
focal_class.full_signature: @Override public void log(LogEvent logEvent)
focal_class.identifier: log
focal_class.modifiers: @Override public
focal_class.parameters: (LogEvent logEvent)
focal_class.return: void
focal_class.signature: void log(LogEvent logEvent)
focal_class.class_method_signature: CentralCollector.close()
focal_class.full_signature: @OnlyUsedByTests public void close()
focal_class.identifier: close
focal_class.modifiers: @OnlyUsedByTests public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: CentralCollector.awaitClose()
focal_class.full_signature: @OnlyUsedByTests public void awaitClose()
focal_class.identifier: awaitClose
focal_class.modifiers: @OnlyUsedByTests public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void awaitClose()
focal_class.class_method_signature: CentralCollector.escapeHostname(String hostname)
focal_class.full_signature: @VisibleForTesting static String escapeHostname(String hostname)
focal_class.identifier: escapeHostname
focal_class.modifiers: @VisibleForTesting static
focal_class.parameters: (String hostname)
focal_class.return: String
focal_class.signature: String escapeHostname(String hostname)
focal_class.class_method_signature: CentralCollector.convertFromV09AgentRollupId(String agentRollupId)
focal_class.full_signature: private static String convertFromV09AgentRollupId(String agentRollupId)
focal_class.identifier: convertFromV09AgentRollupId
focal_class.modifiers: private static
focal_class.parameters: (String agentRollupId)
focal_class.return: String
focal_class.signature: String convertFromV09AgentRollupId(String agentRollupId)
focal_class.class_method_signature: CentralCollector.isAgentVersionGreaterThanCentralVersion(String agentVersion,
              String centralVersion)
focal_class.full_signature: @VisibleForTesting static boolean isAgentVersionGreaterThanCentralVersion(String agentVersion,
              String centralVersion)
focal_class.identifier: isAgentVersionGreaterThanCentralVersion
focal_class.modifiers: @VisibleForTesting static
focal_class.parameters: (String agentVersion,
              String centralVersion)
focal_class.return: boolean
focal_class.signature: boolean isAgentVersionGreaterThanCentralVersion(String agentVersion,
              String centralVersion)
focal_class.class_method_signature: CentralCollector.readConfigSyncedAgentId(File file)
focal_class.full_signature: private static String readConfigSyncedAgentId(File file)
focal_class.identifier: readConfigSyncedAgentId
focal_class.modifiers: private static
focal_class.parameters: (File file)
focal_class.return: String
focal_class.signature: String readConfigSyncedAgentId(File file)
focal_class.class_method_signature: CentralCollector.writeConfigSyncedFile(File file, String agentId)
focal_class.full_signature: private static void writeConfigSyncedFile(File file, String agentId)
focal_class.identifier: writeConfigSyncedFile
focal_class.modifiers: private static
focal_class.parameters: (File file, String agentId)
focal_class.return: void
focal_class.signature: void writeConfigSyncedFile(File file, String agentId)
focal_method.body: @VisibleForTesting
      static String escapeHostname(String hostname) {
          hostname = hostname.replace("\\", "\\\\");
          if (hostname.startsWith(":")) {
              hostname = "\\" + hostname;
          }
          while (hostname.contains("::")) {
              hostname = hostname.replace("::", ":\\:");
          }
          return hostname;
      }
focal_method.class_method_signature: CentralCollector.escapeHostname(String hostname)
focal_method.full_signature: @VisibleForTesting static String escapeHostname(String hostname)
focal_method.identifier: escapeHostname
focal_method.invocations: replace startsWith contains replace
focal_method.modifiers: @VisibleForTesting static
focal_method.parameters: (String hostname)
focal_method.return: String
focal_method.signature: String escapeHostname(String hostname)