Class CommitMetadata


  • public class CommitMetadata
    extends java.lang.Object
    utility class to accept thread local commit properties
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.String> commitProperties()  
      static <R,​E extends java.lang.Exception>
      R
      withCommitProperties​(java.util.Map<java.lang.String,​java.lang.String> properties, java.util.concurrent.Callable<R> callable, java.lang.Class<E> exClass)
      running the code wrapped as a caller, and any snapshot committed within the callable object will be attached with the metadata defined in properties
      • Methods inherited from class java.lang.Object

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

      • withCommitProperties

        public static <R,​E extends java.lang.Exception> R withCommitProperties​(java.util.Map<java.lang.String,​java.lang.String> properties,
                                                                                     java.util.concurrent.Callable<R> callable,
                                                                                     java.lang.Class<E> exClass)
                                                                              throws E extends java.lang.Exception
        running the code wrapped as a caller, and any snapshot committed within the callable object will be attached with the metadata defined in properties
        Parameters:
        properties - extra commit metadata to attach to the snapshot committed within callable
        callable - the code to be executed
        exClass - the expected type of exception which would be thrown from callable
        Throws:
        E extends java.lang.Exception
      • commitProperties

        public static java.util.Map<java.lang.String,​java.lang.String> commitProperties()