@Test public void maybeRequestSync() { final Connector connector = createConnector(); final Connection connection = newConnection( connector ); safeAction( () -> connector.setState( ConnectorState.CONNECTED ) ); assertFalse( connector.shouldRequestSync() ); connector.maybeRequestSync(); assertTrue( connector.ensureConnection().getRequests().isEmpty() ); connection.removeRequest( newRequest( connection ).getRequestId() ); assertTrue( connector.shouldRequestSync() ); connector.maybeRequestSync(); verify( connector.getTransport() ).requestSync(); }
void maybeRequestSync() { if ( shouldRequestSync() ) { requestSync(); } }
Connector extends ReplicantService { void maybeRequestSync() { if ( shouldRequestSync() ) { requestSync(); } } }
Connector extends ReplicantService { void maybeRequestSync() { if ( shouldRequestSync() ) { requestSync(); } } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); }
Connector extends ReplicantService { void maybeRequestSync() { if ( shouldRequestSync() ) { requestSync(); } } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString(); }
Connector extends ReplicantService { void maybeRequestSync() { if ( shouldRequestSync() ) { requestSync(); } } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString();  }