Class GrpcCleanupRule.ServerResource

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) io.grpc.Server server  
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerResource​(io.grpc.Server server)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean awaitReleased​(long duration, java.util.concurrent.TimeUnit timeUnit)
      Returns true if the resource is released in time.
      void cleanUp()  
      void forceCleanUp()
      Error already happened, try the best to clean up.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • server

        final io.grpc.Server server
    • Constructor Detail

      • ServerResource

        ServerResource​(io.grpc.Server server)
    • Method Detail

      • awaitReleased

        public boolean awaitReleased​(long duration,
                                     java.util.concurrent.TimeUnit timeUnit)
                              throws java.lang.InterruptedException
        Description copied from interface: GrpcCleanupRule.Resource
        Returns true if the resource is released in time.
        Specified by:
        awaitReleased in interface GrpcCleanupRule.Resource
        Throws:
        java.lang.InterruptedException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object