Package io.grpc.testing
Class GrpcCleanupRule.ServerResource
- java.lang.Object
-
- io.grpc.testing.GrpcCleanupRule.ServerResource
-
- All Implemented Interfaces:
GrpcCleanupRule.Resource
- Enclosing class:
- GrpcCleanupRule
private static final class GrpcCleanupRule.ServerResource extends java.lang.Object implements GrpcCleanupRule.Resource
-
-
Field Summary
Fields Modifier and Type Field Description (package private) io.grpc.Serverserver
-
Constructor Summary
Constructors Constructor Description ServerResource(io.grpc.Server server)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitReleased(long duration, java.util.concurrent.TimeUnit timeUnit)Returns true if the resource is released in time.voidcleanUp()voidforceCleanUp()Error already happened, try the best to clean up.java.lang.StringtoString()
-
-
-
Method Detail
-
cleanUp
public void cleanUp()
- Specified by:
cleanUpin interfaceGrpcCleanupRule.Resource
-
forceCleanUp
public void forceCleanUp()
Description copied from interface:GrpcCleanupRule.ResourceError already happened, try the best to clean up. Never throws.- Specified by:
forceCleanUpin interfaceGrpcCleanupRule.Resource
-
awaitReleased
public boolean awaitReleased(long duration, java.util.concurrent.TimeUnit timeUnit) throws java.lang.InterruptedExceptionDescription copied from interface:GrpcCleanupRule.ResourceReturns true if the resource is released in time.- Specified by:
awaitReleasedin interfaceGrpcCleanupRule.Resource- Throws:
java.lang.InterruptedException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-