mirror of https://github.com/grpc/grpc-java.git
binder: Make transport notification methods package-private
These are overrides of BinderTransport itself, so not used elsewhere. They are essentially private. It was scary seeing `@GuardedBy` for a public method. I copied the annotation to the base class to make sure ErrorProne could verify the calls.
This commit is contained in:
parent
791f894e25
commit
0a4df9f93c
|
|
@ -260,8 +260,10 @@ public abstract class BinderTransport
|
||||||
return !flowController.isTransmitWindowFull();
|
return !flowController.isTransmitWindowFull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GuardedBy("this")
|
||||||
abstract void notifyShutdown(Status shutdownStatus);
|
abstract void notifyShutdown(Status shutdownStatus);
|
||||||
|
|
||||||
|
@GuardedBy("this")
|
||||||
abstract void notifyTerminated();
|
abstract void notifyTerminated();
|
||||||
|
|
||||||
void releaseExecutors() {
|
void releaseExecutors() {
|
||||||
|
|
@ -720,13 +722,13 @@ public abstract class BinderTransport
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@GuardedBy("this")
|
@GuardedBy("this")
|
||||||
public void notifyShutdown(Status status) {
|
void notifyShutdown(Status status) {
|
||||||
clientTransportListener.transportShutdown(status);
|
clientTransportListener.transportShutdown(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@GuardedBy("this")
|
@GuardedBy("this")
|
||||||
public void notifyTerminated() {
|
void notifyTerminated() {
|
||||||
if (numInUseStreams.getAndSet(0) > 0) {
|
if (numInUseStreams.getAndSet(0) > 0) {
|
||||||
clientTransportListener.transportInUse(false);
|
clientTransportListener.transportInUse(false);
|
||||||
}
|
}
|
||||||
|
|
@ -897,13 +899,13 @@ public abstract class BinderTransport
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@GuardedBy("this")
|
@GuardedBy("this")
|
||||||
public void notifyShutdown(Status status) {
|
void notifyShutdown(Status status) {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@GuardedBy("this")
|
@GuardedBy("this")
|
||||||
public void notifyTerminated() {
|
void notifyTerminated() {
|
||||||
if (serverTransportListener != null) {
|
if (serverTransportListener != null) {
|
||||||
serverTransportListener.transportTerminated();
|
serverTransportListener.transportTerminated();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue