Class Util


  • public final class Util
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends io.grpc.stub.AbstractStub<T>>
      T
      applyRequireLeader​(boolean requireLeader, T stub)  
      static java.util.concurrent.ThreadFactory createThreadFactory​(java.lang.String prefix, boolean daemon)  
      static com.google.protobuf.ByteString prefixNamespace​(com.google.protobuf.ByteString key, ByteSequence namespace)  
      static com.google.protobuf.ByteString prefixNamespace​(ByteSequence key, ByteSequence namespace)  
      static com.google.protobuf.ByteString prefixNamespaceToRangeEnd​(com.google.protobuf.ByteString end, ByteSequence namespace)  
      static com.google.protobuf.ByteString prefixNamespaceToRangeEnd​(ByteSequence end, ByteSequence namespace)  
      static <S,​T>
      java.util.concurrent.CompletableFuture<T>
      toCompletableFuture​(com.google.common.util.concurrent.ListenableFuture<S> sourceFuture, java.util.function.Function<S,​T> resultConvert, java.util.concurrent.Executor executor)
      convert ListenableFuture of Type S to CompletableFuture of Type T.
      static java.util.List<java.net.URI> toURIs​(java.util.Collection<java.lang.String> uris)  
      static com.google.protobuf.ByteString unprefixNamespace​(com.google.protobuf.ByteString key, ByteSequence namespace)  
      • Methods inherited from class java.lang.Object

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

      • toURIs

        public static java.util.List<java.net.URI> toURIs​(java.util.Collection<java.lang.String> uris)
      • toCompletableFuture

        public static <S,​T> java.util.concurrent.CompletableFuture<T> toCompletableFuture​(com.google.common.util.concurrent.ListenableFuture<S> sourceFuture,
                                                                                                java.util.function.Function<S,​T> resultConvert,
                                                                                                java.util.concurrent.Executor executor)
        convert ListenableFuture of Type S to CompletableFuture of Type T.
      • prefixNamespace

        public static com.google.protobuf.ByteString prefixNamespace​(ByteSequence key,
                                                                     ByteSequence namespace)
      • prefixNamespace

        public static com.google.protobuf.ByteString prefixNamespace​(com.google.protobuf.ByteString key,
                                                                     ByteSequence namespace)
      • prefixNamespaceToRangeEnd

        public static com.google.protobuf.ByteString prefixNamespaceToRangeEnd​(ByteSequence end,
                                                                               ByteSequence namespace)
      • prefixNamespaceToRangeEnd

        public static com.google.protobuf.ByteString prefixNamespaceToRangeEnd​(com.google.protobuf.ByteString end,
                                                                               ByteSequence namespace)
      • unprefixNamespace

        public static com.google.protobuf.ByteString unprefixNamespace​(com.google.protobuf.ByteString key,
                                                                       ByteSequence namespace)
      • applyRequireLeader

        public static <T extends io.grpc.stub.AbstractStub<T>> T applyRequireLeader​(boolean requireLeader,
                                                                                    T stub)
      • createThreadFactory

        public static java.util.concurrent.ThreadFactory createThreadFactory​(java.lang.String prefix,
                                                                             boolean daemon)