Class UtilKt

  • All Implemented Interfaces:

    
    public final class UtilKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Unit closeQuietly(Closeable $self, Logger logger) Close this Closeable without throwing any kind of an IOException, if it occurs.
      final static Boolean isValidNSQTopicOrChannel(String $self) Checks whether the current string is a valid NSQ topic or channel name or not.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • closeQuietly

         final static Unit closeQuietly(Closeable $self, Logger logger)

        Close this Closeable without throwing any kind of an IOException, if it occurs. Such exceptions will be logged on INFO level. Other Exceptions will still be thrown. This method might be useful for cleaning up connections whose current state is unclear.

      • isValidNSQTopicOrChannel

         final static Boolean isValidNSQTopicOrChannel(String $self)

        Checks whether the current string is a valid NSQ topic or channel name or not. In particular, this ensures:

        • Not empty

        • Maximum length of 64 characters

        • Only alphanumerical characters, dots, underscores or hyphens

        • A #ephemeral suffix is allowed and is also included in the maximum length