Package kieker.analysis.util
Class HostnameRepository
java.lang.Object
kieker.analysis.util.HostnameRepository
public class HostnameRepository
extends java.lang.Object
A class that manages host names for trace IDs. The intent to register host names via the
addEntry() method
and retrieve them via the get() method.
Furthermore, this repository contains an internal counter, which can be used to automatically remove an entry, when
its counter reaches 0. This can be used to process a stack of BeforeOperationEvents and
AfterOperationEvents by calling the inc() method when a BeforeOperationEvent is processed
and calling the dec() method when an AfterOperationEvent is processed. Thus the entry in this
repository will be removed after the last AfterOperationEvent.- Since:
- 1.14
- Author:
- Sören Henning
-
Constructor Summary
Constructors Constructor Description HostnameRepository() -
Method Summary
Modifier and Type Method Description voidaddEntry(long traceId, java.lang.String hostname)voiddec(long traceId)java.lang.StringgetHostname(long traceId)voidinc(long traceId)
-
Constructor Details
-
HostnameRepository
public HostnameRepository()
-
-
Method Details
-
addEntry
public void addEntry(long traceId, java.lang.String hostname) -
inc
public void inc(long traceId) -
dec
public void dec(long traceId) -
getHostname
public java.lang.String getHostname(long traceId)
-