Package 

Class NamedCallable

  • All Implemented Interfaces:
    com.datadog.android.internal.thread.NamedExecutionUnit , java.util.concurrent.Callable

    
    public final class NamedCallable<V extends Object>
     implements NamedExecutionUnit, Callable<V>
                        

    A wrapper around a Callable that assigns it a sanitized, lowercase name.

    This class is useful when you want to associate a human-readable name with a Callable, for logging, debugging, or tracking purposes.

    The provided name is sanitized by replacing spaces, colons, periods, and commas with underscores (_), and converting all characters to lowercase.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String name
    • Method Summary

      Modifier and Type Method Description
      String getName() Sanitized name after replacing spaces, colons, periods, and commas with underscores (_), and converting all characters to lowercase.
      • Methods inherited from class com.datadog.android.internal.thread.NamedCallable

        call
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NamedCallable

        NamedCallable(String name, Callable<V> callable)
        Parameters:
        name - The name to associate with this callable, will be sanitized for safe usage.
        callable - The actual callable to be executed when call is called.
    • Method Detail

      • getName

         String getName()

        Sanitized name after replacing spaces, colons, periods, and commas with underscores (_), and converting all characters to lowercase.