@Test public void testBorrowNotSet() throws Exception { setupBorrow(false); assertFalse(underTest.borrow().isValid()); verifyBorrow(false); }
@Override public Borrowed<T> borrow() { retain(); final T value = reference.get(); if (value == null) { release(); return invalid(); } final ValidBorrowed b = new ValidBorrowed(value, getStackTrace()); if (traces != null) { traces.add(b); } return b; }
ConcurrentManaged implements Managed<T> { @Override public Borrowed<T> borrow() { retain(); final T value = reference.get(); if (value == null) { release(); return invalid(); } final ValidBorrowed b = new ValidBorrowed(value, getStackTrace()); if (traces != null) { traces.add(b); } return b; } }
ConcurrentManaged implements Managed<T> { @Override public Borrowed<T> borrow() { retain(); final T value = reference.get(); if (value == null) { release(); return invalid(); } final ValidBorrowed b = new ValidBorrowed(value, getStackTrace()); if (traces != null) { traces.add(b); } return b; } ConcurrentManaged(
      final Caller caller, final ManagedOptions options, final Supplier<? extends Stage<T>> setup,
      final Completable<Void> startFuture, final Completable<Void> zeroLeaseFuture,
      final Completable<T> stopReferenceFuture, final Stage<Void> stopFuture
  ); }
ConcurrentManaged implements Managed<T> { @Override public Borrowed<T> borrow() { retain(); final T value = reference.get(); if (value == null) { release(); return invalid(); } final ValidBorrowed b = new ValidBorrowed(value, getStackTrace()); if (traces != null) { traces.add(b); } return b; } ConcurrentManaged(
      final Caller caller, final ManagedOptions options, final Supplier<? extends Stage<T>> setup,
      final Completable<Void> startFuture, final Completable<Void> zeroLeaseFuture,
      final Completable<T> stopReferenceFuture, final Stage<Void> stopFuture
  ); static ConcurrentManaged<T> newManaged(
      final Async async, final Caller caller, final ManagedOptions options,
      final Supplier<? extends Stage<T>> setup,
      final Function<? super T, ? extends Stage<Void>> teardown
  ); @Override Stage<R> doto(
      final Function<? super T, ? extends Stage<R>> action
  ); @Override Borrowed<T> borrow(); @Override boolean isReady(); @Override Stage<Void> start(); @Override Stage<Void> stop(); @Override String toString(); }
ConcurrentManaged implements Managed<T> { @Override public Borrowed<T> borrow() { retain(); final T value = reference.get(); if (value == null) { release(); return invalid(); } final ValidBorrowed b = new ValidBorrowed(value, getStackTrace()); if (traces != null) { traces.add(b); } return b; } ConcurrentManaged(
      final Caller caller, final ManagedOptions options, final Supplier<? extends Stage<T>> setup,
      final Completable<Void> startFuture, final Completable<Void> zeroLeaseFuture,
      final Completable<T> stopReferenceFuture, final Stage<Void> stopFuture
  ); static ConcurrentManaged<T> newManaged(
      final Async async, final Caller caller, final ManagedOptions options,
      final Supplier<? extends Stage<T>> setup,
      final Function<? super T, ? extends Stage<Void>> teardown
  ); @Override Stage<R> doto(
      final Function<? super T, ? extends Stage<R>> action
  ); @Override Borrowed<T> borrow(); @Override boolean isReady(); @Override Stage<Void> start(); @Override Stage<Void> stop(); @Override String toString();  }