Class Compatibility


  • public class Compatibility
    extends java.lang.Object
    Utils to help with ZK 3.4.x compatibility
    • Constructor Summary

      Constructors 
      Constructor Description
      Compatibility()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void injectSessionExpiration​(org.apache.zookeeper.ZooKeeper zooKeeper)
      For ZooKeeper 3.5.x, use the supported zooKeeper.getTestable().injectSessionExpiration().
      static boolean isZK34()
      Return true if the classpath ZooKeeper library is 3.4.x
      • Methods inherited from class java.lang.Object

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

      • Compatibility

        public Compatibility()
    • Method Detail

      • isZK34

        public static boolean isZK34()
        Return true if the classpath ZooKeeper library is 3.4.x
        Returns:
        true/false
      • injectSessionExpiration

        public static void injectSessionExpiration​(org.apache.zookeeper.ZooKeeper zooKeeper)
        For ZooKeeper 3.5.x, use the supported zooKeeper.getTestable().injectSessionExpiration(). For ZooKeeper 3.4.x do the equivalent via reflection
        Parameters:
        zooKeeper - client