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();
|
||||
}
|
||||
|
||||
@GuardedBy("this")
|
||||
abstract void notifyShutdown(Status shutdownStatus);
|
||||
|
||||
@GuardedBy("this")
|
||||
abstract void notifyTerminated();
|
||||
|
||||
void releaseExecutors() {
|
||||
|
|
@ -720,13 +722,13 @@ public abstract class BinderTransport
|
|||
|
||||
@Override
|
||||
@GuardedBy("this")
|
||||
public void notifyShutdown(Status status) {
|
||||
void notifyShutdown(Status status) {
|
||||
clientTransportListener.transportShutdown(status);
|
||||
}
|
||||
|
||||
@Override
|
||||
@GuardedBy("this")
|
||||
public void notifyTerminated() {
|
||||
void notifyTerminated() {
|
||||
if (numInUseStreams.getAndSet(0) > 0) {
|
||||
clientTransportListener.transportInUse(false);
|
||||
}
|
||||
|
|
@ -897,13 +899,13 @@ public abstract class BinderTransport
|
|||
|
||||
@Override
|
||||
@GuardedBy("this")
|
||||
public void notifyShutdown(Status status) {
|
||||
void notifyShutdown(Status status) {
|
||||
// Nothing to do.
|
||||
}
|
||||
|
||||
@Override
|
||||
@GuardedBy("this")
|
||||
public void notifyTerminated() {
|
||||
void notifyTerminated() {
|
||||
if (serverTransportListener != null) {
|
||||
serverTransportListener.transportTerminated();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue