Package com.linkedin.d2.discovery.event.PropertyEventThread

Examples of com.linkedin.d2.discovery.event.PropertyEventThread.PropertyEvent


  @Override
  public void register(final Set<String> propertyNames,
                       final PropertyEventSubscriber<T> subscriber)
  {
    _thread.send(new PropertyEvent("PropertyEventBus.register " + propertyNames)
    {
      public void innerRun()
      {
        for (final String prop : propertyNames)
        {
View Full Code Here


  @Override
  public void unregister(final Set<String> propertyNames,
                         final PropertyEventSubscriber<T> subscriber)
  {
    _thread.send(new PropertyEvent("PropertyEventBus.unregister " + propertyNames)
    {
      public void innerRun()
      {
        for (final String prop : propertyNames)
        {
View Full Code Here

  @Override
  public void setPublisher(final PropertyEventPublisher<T> publisher)
  {

    _thread.send(new PropertyEvent("PropertyEventBus.setPublisher")
    {
      public void innerRun()
      {
        if (_publisher != null)
        {
View Full Code Here

    if (value == null)
    {
      _log.warn("Received a null event during publishInitialize for String prop = " + prop +
                    ". Still publishing the null event.");
    }
    _thread.send(new PropertyEvent("PropertyEventBus.publishInitialize " + prop)
    {
      public void innerRun()
      {
        // Because the bus can switch publishers, a new publisher may consider an event
        // an "initialize", but if the bus has previously seen that property, we will treat
View Full Code Here

    if (value == null)
    {
      _log.warn("Received a null event during publishAdd for String prop = " + prop +
                    ". Still publishing the null event.");
    }
    _thread.send(new PropertyEvent("PropertyEventBus.publishAdd " + prop)
    {
      public void innerRun()
      {
        // Ignore unless the property has been initialized
        if (_properties.containsKey(prop))
View Full Code Here

  }

  @Override
  public void publishRemove(final String prop)
  {
    _thread.send(new PropertyEvent("PropertyEventBus.publishRemove " + prop)
    {
      public void innerRun()
      {
        // Ignore unless the property has been initialized
        if (_properties.containsKey(prop))
View Full Code Here

  public void register(final SimpleLoadBalancerStateListener listener)
  {
    trace(_log, "register listener: ", listener);

    _executor.execute(new PropertyEvent("add listener for state")
    {
      @Override
      public void innerRun()
      {
        _listeners.add(listener);
View Full Code Here

  public void unregister(final SimpleLoadBalancerStateListener listener)
  {
    trace(_log, "unregister listener: ", listener);

    _executor.execute(new PropertyEvent("remove listener for state")
    {
      @Override
      public void innerRun()
      {
        _listeners.remove(listener);
View Full Code Here

  public void shutdown(final PropertyEventShutdownCallback shutdown)
  {
    trace(_log, "shutdown");

    // shutdown all three registries, all tracker clients, and the event thread
    _executor.execute(new PropertyEvent("shutdown load balancer state")
    {
      @Override
      public void innerRun()
      {
        // put all tracker clients into a single set for convenience
View Full Code Here

  public void setVersion(final long version)
  {
    trace(_log, "setVersion: ", version);

    _executor.execute(new PropertyEvent("set version to: " + version)
    {
      @Override
      public void innerRun()
      {
        info(_log, "set global version to: ", version);
View Full Code Here

TOP

Related Classes of com.linkedin.d2.discovery.event.PropertyEventThread.PropertyEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.