Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for enterIf (0.04 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

      protected final void tearDown() {
        tearDownStack.runTearDown();
      }
    
      private String enter() {
        return interruptible ? "enterInterruptibly" : "enter";
      }
    
      private String tryEnter() {
        return "tryEnter";
      }
    
      private String enterIf() {
        return interruptible ? "enterIfInterruptibly" : "enterIf";
      }
    
      private String tryEnterIf() {
        return "tryEnterIf";
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       */
      @CanIgnoreReturnValue
      @Override
      public boolean offer(E e) {
        if (e == null) throw new NullPointerException();
        Monitor monitor = this.monitor;
        if (monitor.enterIf(notFull)) {
          try {
            insert(e);
            return true;
          } finally {
            monitor.leave();
          }
        } else {
          return false;
        }
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/AbstractService.java

       *
       * @since 27.0
       */
      @ForOverride
      protected void doCancelStart() {}
    
      @CanIgnoreReturnValue
      @Override
      public final Service startAsync() {
        if (monitor.enterIf(isStartable)) {
          try {
            snapshot = new StateSnapshot(STARTING);
            enqueueStartingEvent();
            doStart();
          } catch (Throwable startupFailure) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 19 21:24:11 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AbstractService.java

       *
       * @since 27.0
       */
      @ForOverride
      protected void doCancelStart() {}
    
      @CanIgnoreReturnValue
      @Override
      public final Service startAsync() {
        if (monitor.enterIf(isStartable)) {
          try {
            snapshot = new StateSnapshot(STARTING);
            enqueueStartingEvent();
            doStart();
          } catch (Throwable startupFailure) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 19 21:24:11 UTC 2025
    - 20.3K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/Monitor.java

          }
        };
      }
    
      /** Enters this monitor. Blocks indefinitely. */
      public void enter() {
        lock.lock();
      }
    
      /**
       * Enters this monitor. Blocks at most the given time.
       *
       * @return whether the monitor was entered
       * @since 28.0 (but only since 33.4.0 in the Android flavor)
       */
      public boolean enter(Duration time) {
        return enter(toNanosSaturated(time), TimeUnit.NANOSECONDS);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 42.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

       * methods that do not take an explicit timeout value, a single test case is generated only if the
       * implicit timeout of that method matches the given timeoutsToUse. For example, enter() is
       * treated like enter(MAX, MILLIS) and tryEnter() is treated like enter(0, MILLIS).
       */
      private static void addTests(
          TestSuite suite,
          Method method,
          Scenario scenario,
          TimeoutsToUse timeoutsToUse,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 27K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

        /** Constructor for use by subclasses. */
        public Listener() {}
    
        /**
         * Called when the service initially becomes healthy.
         *
         * <p>This will be called at most once after all the services have entered the {@linkplain
         * State#RUNNING running} state. If any services fail during start up or {@linkplain
         * State#FAILED fail}/{@linkplain State#TERMINATED terminate} before all other services have
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Service.java

     * therefore every method of the listener will be called at most once. N.B. The {@link State#FAILED}
     * and {@link State#TERMINATED} states are terminal states, once a service enters either of these
     * states it cannot ever leave them.
     *
     * <p>Implementors of this interface are strongly encouraged to extend one of the abstract classes
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/Service.java

     * therefore every method of the listener will be called at most once. N.B. The {@link State#FAILED}
     * and {@link State#TERMINATED} states are terminal states, once a service enters either of these
     * states it cannot ever leave them.
     *
     * <p>Implementors of this interface are strongly encouraged to extend one of the abstract classes
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

      public <T> T[] toArray(T[] a) {
        Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toArray(a);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public String toString() {
        Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toString();
        } finally {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 18.9K bytes
    - Viewed (0)
Back to top