Adds the given tag handler to this tag handler pool, unless this tag
handler pool has already reached its capacity, in which case the tag
handler's release() method is called.

@param handler Tag handler to add to this tag handler pool
544393
public void reuse(Tag handler) {
        synchronized( this ) {
            if (current < (handlers.length - 1)) {
                handlers[++current] = handler;
                return;
            }
        }
        // There is no need for other threads to wait for us to release
        handler.release();
    }
495474
def register_handler(self, handler):
        
        self._handlers[handler.namespace] = handler

        handler.registered(self)
641342
public void addHandler(Handler handler) {
        if (null == handlers) {
            handlers = new ArrayList<>();
        }
        handlers.add(handler);
    }
1119764
public void addImportExportHandler(I_CmsImportExportHandler handler) {

        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_IMPORTEXPORT_ADDED_IMPORTEXPORT_HANDLER_1, handler));
        }
        m_importExportHandlers.add(handler);
    }
1234295
public void reuse(Tag tag) {
	tag.release();
	Queue<Tag> queue = getQueue(tag.getClass().getName());
	queue.add(tag);
    }
1237327
public void addEntityChangeHandler(String entityId, ValueChangeHandler<CmsEntity> handler) {

        CmsEntity entity = m_entityBackend.getEntity(entityId);
        if (entity != null) {
            entity.addValueChangeHandler(handler);
        }
    }
556011
@Override
    public HandlerRegistration addSearchFinishHandler(final SearchFinishEvent.SearchFinishHandler handler) {
        return addHandler(handler, SearchFinishEvent.TYPE);
    }
667252
public <T extends MvpPresenter> void add(String tag, T instance) {
		mPresenters.put(tag, instance);
	}
829811
public function addHandler(string $type, RequestHandlerInterface $handler): void
    {
        $this->handlers[$type] = $handler;
    }
181399
def set_handler(self, handler):
        
        if self._handler:
            raise Exception('Handler was already set')
        if handler:
            self._handler = async_task(handler, loop=self._loop)
794429
@Advice.OnMethodEnter
	private static void addHandlers(@Advice.Argument(value = 0, readOnly = false) List<Handler> handlerChain, @Advice.This Binding binding) {
		final java.util.logging.Logger logger = java.util.logging.Logger.getLogger("org.stagemonitor.tracing.soap.SoapHandlerTransformer");
		final List<Handler<?>> stagemonitorHandlers = Dispatcher.get("org.stagemonitor.tracing.soap.SoapHandlerTransformer");

		if (stagemonitorHandlers != null) {
			logger.fine("Adding SOAPHandlers " + stagemonitorHandlers + " to handlerChain for Binding " + binding);
			if (handlerChain == null) {
				handlerChain = Collections.emptyList();
			}
			// creating a new list as we don't know if handlerChain is immutable or not
			handlerChain = new ArrayList<Handler>(handlerChain);
			for (Handler<?> stagemonitorHandler : stagemonitorHandlers) {
				if (!handlerChain.contains(stagemonitorHandler) &&
						// makes sure we only add the handler to the correct application
						Dispatcher.isVisibleToCurrentContextClassLoader(stagemonitorHandler)) {
					handlerChain.add(stagemonitorHandler);
				}
			}
			logger.fine("Handler Chain: " + handlerChain);
		} else {
			logger.fine("No SOAPHandlers found in Dispatcher for Binding " + binding);
		}
	}
1298785
@SuppressWarnings("unchecked")
    public T addTags(List<String> tags) {
        if (this.tags_ == null) {
            tags_ = new ArrayList<>();
        }
        this.tags_.addAll(tags);
        return (T) this;
    }
27240
public void addMapHandler(AbstractGeometryIndexMapHandler handler) {
		handler.setIndex(index);
		handler.setService(service);
		handler.setEventParser(this);
		if (handler instanceof MapDownHandler) {
			downHandlers.add((MapDownHandler) handler);
		}
		if (handler instanceof MapUpHandler) {
			upHandlers.add((MapUpHandler) handler);
		}
		if (handler instanceof MapDragHandler) {
			dragHandlers.add((MapDragHandler) handler);
		}
		if (handler instanceof MouseOverHandler) {
			overHandlers.add((MouseOverHandler) handler);
		}
		if (handler instanceof MouseOutHandler) {
			outHandlers.add((MouseOutHandler) handler);
		}
		if (handler instanceof MouseMoveHandler) {
			moveHandlers.add((MouseMoveHandler) handler);
		}
		if (handler instanceof DoubleClickHandler) {
			doubleClickHandlers.add((DoubleClickHandler) handler);
		}
	}
70667
@VisibleForTesting
  static void register(final SpanExporter spanExporter, final SpanExporter.Handler handler) {
    spanExporter.registerHandler(REGISTER_NAME, handler);
  }
873251
@Nonnull
  public final HandlerRegistration addCloseHandler( @Nonnull final CloseEvent.Handler handler )
  {
    return _eventBus.addHandler( CloseEvent.getType(), handler );
  }
606670
public boolean removeHandler(PacketHandler handler) {
        synchronized (this.handlers) {
            boolean removed = this.handlers.remove(handler);
            if (removed) {
                this.count.decrementAndGet();
            }
            return removed;
        }
    }
1164006
public void setTagsToRemove(java.util.Collection<String> tagsToRemove) {
        if (tagsToRemove == null) {
            this.tagsToRemove = null;
            return;
        }

        this.tagsToRemove = new com.amazonaws.internal.SdkInternalList<String>(tagsToRemove);
    }