Class ZooRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class ZooRule
    extends SdkRule
    Taken from apache curator BaseClassForTests. A low-level rule for testing zookeeper-based recipes. Encapsulates an SdkRule instance.
    • Field Summary

      • Fields inherited from class com.attivio.sdk.test.SdkRule

        tmp
    • Constructor Summary

      Constructors 
      Constructor Description
      ZooRule()  
      ZooRule​(java.lang.String ns)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      org.apache.curator.framework.CuratorFramework curator()  
      org.apache.curator.framework.CuratorFramework newCurator()  
      org.apache.curator.framework.CuratorFramework[] newCurators​(int size)  
      void resetServer()
      Completely destroys current ZK and its data
      void startServer​(org.apache.curator.framework.CuratorFramework cf)  
      void stopServer()  
      void triggerReconnect​(org.apache.curator.framework.CuratorFramework cf)  
      • Methods inherited from class java.lang.Object

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

      • ZooRule

        public ZooRule()
      • ZooRule

        public ZooRule​(java.lang.String ns)
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Description copied from class: SdkRule
        Specified by:
        apply in interface org.junit.rules.TestRule
        Overrides:
        apply in class SdkRule
      • triggerReconnect

        public void triggerReconnect​(org.apache.curator.framework.CuratorFramework cf)
                              throws java.lang.Exception
        Parameters:
        cf -
        Throws:
        java.lang.Exception
      • stopServer

        public void stopServer()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • startServer

        public void startServer​(org.apache.curator.framework.CuratorFramework cf)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • curator

        public org.apache.curator.framework.CuratorFramework curator()
      • newCurators

        public org.apache.curator.framework.CuratorFramework[] newCurators​(int size)
      • newCurator

        public org.apache.curator.framework.CuratorFramework newCurator()
      • resetServer

        public void resetServer()
                         throws java.lang.Exception
        Completely destroys current ZK and its data
        Throws:
        java.lang.Throwable
        java.lang.Exception