Class EventResourcesImpl
java.lang.Object
org.apache.pulsar.structuredeventlog.EventResourcesImpl
- All Implemented Interfaces:
EventResources
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(EventResourcesImpl other) voidforEach(BiConsumer<String, String> process) static voidAdd a resource for the event.Add a resource for the event using a supplier.
-
Constructor Details
-
EventResourcesImpl
-
-
Method Details
-
resource
Description copied from interface:EventResourcesAdd a resource for the event. Resources are inherited by child events.- Specified by:
resourcein interfaceEventResources- Parameters:
key- the key to identify the resourcevalue- the value which will be logged for the resource. This is converted to a string before logging.- Returns:
- this
-
resource
Description copied from interface:EventResourcesAdd a resource for the event using a supplier. The supplier is used in the case that generating the string from the object is expensive or we want to generate a custom string.- Specified by:
resourcein interfaceEventResources- Parameters:
key- the key to identify the resourcevalue- a supplier which returns the value to be logged for this resource- See Also:
-
copyFrom
-
forEach
-
forEach
-