Push a {@link BucketConfig} into the config stream.

@param ctx the config context to push.
342653
protected void pushConfig(final ProposedBucketConfigContext ctx) {
        try {
            configStream.onNext(ctx);
        } catch (Exception e) {
            LOGGER.warn("Exception while pushing new configuration - ignoring.", e);
        }
    }
613975
private void push(final LazyNode token){
		stackTop.addChild(token);
		// The stack allocation strategy here is to increase it in increments
		// of a power of two. This lets us check when all low bits are set and
		// its time to increase the stack again.
		// This lets us do a compare between a constant and a variable instead
		// of between two variables.
		if((stackPointer & STACK_INCREASE)==STACK_INCREASE){
			LazyNode[] newStack=new LazyNode[STACK_SIZE+STACK_INCREASE+1];
			System.arraycopy(stack,0,newStack,0,STACK_SIZE);
			STACK_SIZE=STACK_SIZE+STACK_INCREASE+1;
			stack=newStack;
		}
		stack[stackPointer++]=token;
		stackTop=token;
	}
897831
def invoke(self, ctx):
        
        if self.overflow:
            ctx.ensure_object(Config).update(dict(overflow=self.overflow))
        return super(ClickGroup, self).invoke(ctx)
564891
@Override
  public void channelActive(final ChannelHandlerContext ctx) throws Exception {
    String terseUri = "/pools/default/bs/" + bucket;
    FullHttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, terseUri);
    request.headers().add(HttpHeaders.Names.ACCEPT, "application/json");
    addHttpBasicAuth(ctx, request);
    ctx.writeAndFlush(request);
  }
89206
public void push(T token) {
        if (token == lastPushed) return;
        lastPushed = token;
        if (token.getChannel() == TokenChannel.Default) {
            main.add(token);
        }
        all.add(token);
    }
978061
private void upsertBucketConfig(final BucketConfig newConfig) {
        ClusterConfig cluster = currentConfig;
        BucketConfig oldConfig = cluster.bucketConfig(newConfig.name());

        if (newConfig.rev() > 0 && oldConfig != null && newConfig.rev() <= oldConfig.rev()) {
            LOGGER.trace("Not applying new configuration, older or same rev ID.");
            return;
        }

        // If the current password of the config is empty and an old config exists
        // make sure to transfer the password over to the new config. Otherwise it
        // is possible that authentication errors because of a null password arise.
        // See JVMCBC-185
        if (newConfig.password() == null && oldConfig != null) {
            newConfig.password(oldConfig.password());
        }

        //copy the username as well
        if (oldConfig != null) {
            newConfig.username(oldConfig.username());
        }

        // this is the first config, decide on external networking
        if (oldConfig == null) {
            externalNetwork = determineNetworkResolution(newConfig, environment.networkResolution(), seedHosts);
            LOGGER.info("Selected network configuration: {}", externalNetwork != null ? externalNetwork : "default");
        }

        if (externalNetwork != null) {
            newConfig.useAlternateNetwork(externalNetwork);
        }

        cluster.setBucketConfig(newConfig.name(), newConfig);
        LOGGER.debug("Applying new configuration {}", newConfig);

        currentConfig = cluster;

        boolean tainted = newConfig.tainted();
        for (Refresher refresher : refreshers.values()) {
            if (tainted) {
                refresher.markTainted(newConfig);
            } else {
                refresher.markUntainted(newConfig);
            }
        }

        configObservable.onNext(currentConfig);
    }
442086
private void closeContext(DirContext ctx) {
		if (ctx != null) {
			try {
				ctx.close();
			}
			catch (Exception e) {
                LOG.debug("Exception closing context", e);
			}
		}
	}
339725
public void sendRequestPacket(String nodeID, Context ctx) {
		FastBuildTree msg = new FastBuildTree(11);

		// Add basic properties (version, sender's nodeID, etc.)
		msg.putUnsafe("ver", PROTOCOL_VERSION);
		msg.putUnsafe("sender", this.nodeID);
		msg.putUnsafe("id", ctx.id);
		msg.putUnsafe("action", ctx.name);

		// Add params and meta
		if (ctx.params != null) {
			msg.putUnsafe("params", ctx.params.asObject());
			Tree meta = ctx.params.getMeta(false);
			if (meta != null && !meta.isEmpty()) {
				msg.putUnsafe("meta", meta.asObject());
			}
		}

		// Timeout
		if (ctx.opts != null && ctx.opts.timeout > 0) {
			msg.putUnsafe("timeout", ctx.opts.timeout);
		}

		// Call level
		msg.putUnsafe("level", ctx.level);

		// Parent ID
		if (ctx.parentID != null) {
			msg.putUnsafe("parentID", ctx.parentID);
		}

		// Request ID
		msg.putUnsafe("requestID", ctx.requestID);

		// Stream packet counter (default is "0" = packet isn't streamed)
		if (ctx.stream != null) {

			// Streaming in progress
			msg.putUnsafe("stream", true);

			// First sequence
			msg.putUnsafe("seq", 0);
		}

		// Send message
		publish(Transporter.PACKET_REQUEST, nodeID, msg);
	}
1257162
private void maybePushConfigChunk() {
        String currentChunk = responseContent.toString(CHARSET);

        int separatorIndex = currentChunk.indexOf("\n\n\n\n");
        if (separatorIndex > 0) {
            String content = currentChunk.substring(0, separatorIndex);
            streamingConfigObservable.onNext(content.trim());
            responseContent.clear();
            responseContent.writeBytes(currentChunk.substring(separatorIndex + 4).getBytes(CHARSET));
        }
    }
503801
public static Builder withConfig(String location) {
        try {
            return new Builder(PushConfiguration.read(location));
        }
        catch(IOException e){
            logger.log(Level.SEVERE, "Could not read config file", e);
            return null;
        }
    }
208043
@Override
  boolean push(TraceMethod traceMethod) {
    boolean success;
    TracingContext currentTracingContext = getCurrentTracingContext();
    if (currentTracingContext != null && !currentTracingContext.isCorrupted()) {
      if (currentTracingContext.getMethodStack().size() >= STACK_SIZE) {
        currentTracingContext.setCorrupted(true);
        throw new ThreadMap.RuntimeException("Stacksize is exceeded.");
      }
      else {
        currentTracingContext.getMethodStack().push(traceMethod);
        success = true;
      }
    }
    else
      success = false;
    
    return success;
  }
861736
boolean insertToBucket(long bucketIndex, long tag) {

		for (int i = 0; i < CuckooFilter.BUCKET_SIZE; i++) {
			if (checkTag(bucketIndex, i, 0)) {
				writeTagNoClear(bucketIndex, i, tag);
				return true;
			}
		}
		return false;
	}
574273
public void pushContexts(BeanO beanO) throws CSIException {
        // Push the callback BeanO first since this is fallible.
        pushCallbackBeanO(beanO);

        // Pushing ComponentMetaData and ClassLoader are infallible.
        BeanMetaData bmd = beanO.home.beanMetaData;
        pushMetaDataContexts(bmd);
    }
217765
@Override
    public void channelHandlerContext(ChannelHandlerContext ctx) throws Http2Exception {
        this.ctx = checkNotNull(ctx, "ctx");

        // Writing the pending bytes will not check writability change and instead a writability change notification
        // to be provided by an explicit call.
        channelWritabilityChanged();

        // Don't worry about cleaning up queued frames here if ctx is null. It is expected that all streams will be
        // closed and the queue cleanup will occur when the stream state transitions occur.

        // If any frames have been queued up, we should send them now that we have a channel context.
        if (isChannelWritable()) {
            writePendingBytes();
        }
    }
589436
def config_ctx(func):
    
    # Create ConfigurationContext subclass
    class _ConfigurationContext(ConfigurationContext):
        # Set command name for the context class
        cmd = func.__name__

        # Set function name for the context class
        fun = func.__name__

    # Store the created context class with the decorated function
    func._context_class = _ConfigurationContext  # pylint: disable=W0212

    # Return the decorated function
    return func
1327212
public void setPrefixConfig(final PrefixConfig config) {
		lock.writeLock().lock();
		try {
			if (config == null) {
				prefixes = EmptyPrefix.INSTANCE;
			} else {
				prefixes = config;
			}
		} finally {
			lock.writeLock().unlock();
		}
	}
1205220
public void setBuckets(java.util.Collection<Bucket> buckets) {
        if (buckets == null) {
            this.buckets = null;
            return;
        }

        this.buckets = new com.amazonaws.internal.SdkInternalList<Bucket>(buckets);
    }