Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 78 for Subscriber (0.17 sec)

  1. android/guava-tests/test/com/google/common/eventbus/SubscriberRegistryTest.java

        Iterator<Subscriber> two = registry.getSubscribers("");
        assertEquals(s1, two.next().target);
        assertEquals(o1, two.next().target);
        assertFalse(two.hasNext());
      }
    
      public static class StringSubscriber {
    
        @Subscribe
        public void handle(String s) {}
      }
    
      public static class IntegerSubscriber {
    
        @Subscribe
        public void handle(Integer i) {}
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  2. internal/pubsub/pubsub.go

    			default:
    			}
    		}
    	}
    }
    
    // Subscribe - Adds a subscriber to pubsub system
    func (ps *PubSub[T, M]) Subscribe(mask M, subCh chan T, doneCh <-chan struct{}, filter func(entry T) bool) error {
    	totalSubs := atomic.AddInt32(&ps.numSubscribers, 1)
    	if ps.maxSubscribers > 0 && totalSubs > ps.maxSubscribers {
    		atomic.AddInt32(&ps.numSubscribers, -1)
    		return fmt.Errorf("the limit of `%d` subscribers is reached", ps.maxSubscribers)
    	}
    	ps.Lock()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/eventbus/outside/BaseSubscriberFinderTest.java

    import com.google.common.collect.Lists;
    import com.google.common.eventbus.Subscribe;
    import com.google.common.eventbus.outside.BaseSubscriberFinderTest.Subscriber;
    import java.util.List;
    
    public class BaseSubscriberFinderTest extends AbstractEventBusTest<Subscriber> {
      static class Subscriber {
        final List<Object> nonSubscriberEvents = Lists.newArrayList();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 08 21:35:40 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/eventbus/Subscribe.java

     *
     * <p>Unless also annotated with @{@link AllowConcurrentEvents}, event subscriber methods will be
     * invoked serially by each event bus that they are registered with.
     *
     * @author Cliff Biffle
     * @since 10.0
     */
    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:05:46 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/eventbus/PackageSanityTests.java

      }
    
      private static class DummySubscriber {
    
        private final EventBus eventBus = new EventBus();
    
        @Subscribe
        public void handle(@Nullable Object anything) {}
    
        Subscriber toSubscriber() throws Exception {
          return Subscriber.create(eventBus, this, subscriberMethod());
        }
    
        SubscriberExceptionContext toContext() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/eventbus/DeadEvent.java

    import static com.google.common.base.Preconditions.checkNotNull;
    
    import com.google.common.base.MoreObjects;
    
    /**
     * Wraps an event that was posted, but which had no subscribers and thus could not be delivered.
     *
     * <p>Registering a DeadEvent subscriber is useful for debugging or logging, as it can detect
     * misconfigurations in a system's event distribution.
     *
     * @author Cliff Biffle
     * @since 10.0
     */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:05:46 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/eventbus/PackageSanityTests.java

      }
    
      private static class DummySubscriber {
    
        private final EventBus eventBus = new EventBus();
    
        @Subscribe
        public void handle(@Nullable Object anything) {}
    
        Subscriber toSubscriber() throws Exception {
          return Subscriber.create(eventBus, this, subscriberMethod());
        }
    
        SubscriberExceptionContext toContext() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 16 22:49:59 GMT 2018
    - 1.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/eventbus/SubscriberRegistryTest.java

        Iterator<Subscriber> two = registry.getSubscribers("");
        assertEquals(s1, two.next().target);
        assertEquals(o1, two.next().target);
        assertFalse(two.hasNext());
      }
    
      public static class StringSubscriber {
    
        @Subscribe
        public void handle(String s) {}
      }
    
      public static class IntegerSubscriber {
    
        @Subscribe
        public void handle(Integer i) {}
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/eventbus/AllowConcurrentEvents.java

    import java.lang.annotation.RetentionPolicy;
    import java.lang.annotation.Target;
    
    /**
     * Marks an event subscriber method as being thread-safe. This annotation indicates that EventBus
     * may invoke the event subscriber simultaneously from multiple threads.
     *
     * <p>This does not mark the method, and so should be used in combination with {@link Subscribe}.
     *
     * @author Cliff Biffle
     * @since 10.0
     */
    @Retention(RetentionPolicy.RUNTIME)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:05:46 GMT 2021
    - 1.2K bytes
    - Viewed (0)
  10. internal/pubsub/pubsub_test.go

    		t.Fatalf("want %d subscribers, got %d", want, got)
    	}
    	if want, got := int32(2), ps.NumSubscribers(Mask(2)); got != want {
    		t.Fatalf("want %d subscribers, got %d", want, got)
    	}
    	if want, got := int32(2), ps.NumSubscribers(Mask(1|2)); got != want {
    		t.Fatalf("want %d subscribers, got %d", want, got)
    	}
    	if want, got := int32(2), ps.NumSubscribers(MaskAll); got != want {
    		t.Fatalf("want %d subscribers, got %d", want, got)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.8K bytes
    - Viewed (0)
Back to top