Codota Logo
NDC.push
Code IndexAdd Codota to your IDE (free)

How to use
push
method
in
org.dcache.util.NDC

Best Java code snippets using org.dcache.util.NDC.push (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: dCache/dcache

/**
 * Setup message related diagnostic context for the calling
 * thread. Adds information about a message to the MDC and NDC.
 *
 * @see clearMessageContext
 */
public static void setMessageContext(CellMessage envelope)
{
  Object session = envelope.getSession();
  NDC.push(getMessageContext(envelope));
  setMdc(MDC_SESSION, (session == null) ? null : session.toString());
}
origin: dCache/dcache

@Override
public List<InetAddress> get()
  NDC.push("NIC auto-discovery");
  try {
    ArrayList<InetAddress> addresses = new ArrayList<>();
origin: dCache/dcache

NDC.push(toUriString(remoteSocketAddress.getAddress()) + ':' + remoteSocketAddress.getPort());
try {
  LOGGER.info("acceptThread ({}): creating protocol engine", t);
origin: dCache/dcache

void doAuthPhase(LoginMonitor monitor, Subject subject, Set<Principal> principals,
    Set<Restriction> restrictionStore) throws AuthenticationException
{
  Set<Object> publicCredentials = subject.getPublicCredentials();
  Set<Object> privateCredentials = subject.getPrivateCredentials();
  principals.addAll(subject.getPrincipals());
  NDC.push("AUTH");
  Result result = Result.FAIL;
  try {
    monitor.authBegins(publicCredentials, privateCredentials, principals);
    authStrategy.authenticate(monitor, publicCredentials, privateCredentials,
        principals, restrictionStore);
    result = Result.SUCCESS;
  } finally {
    NDC.pop();
    monitor.authEnds(principals, result);
  }
}
origin: dCache/dcache

@Override
public void run()
{
  NDC.push(_remoteDomainInfo.toString());
  try {
    CellMessage msg;
    while ((msg = _input.readObject()) != null) {
      getNucleus().sendMessage(msg, true, _allowForwardingOfRemoteMessages, false);
      _messagesToSystem.increment();
    }
  } catch (AsynchronousCloseException | EOFException ignored) {
  } catch (ClassNotFoundException e) {
    _log.warn("Cannot deserialize object. This is most likely due to a version mismatch.");
  } catch (IOException e) {
    _log.warn("Error while reading from tunnel: {}", e.toString());
  } finally {
    kill();
    NDC.pop();
  }
}
origin: dCache/dcache

  Set<Object> doSessionPhase(LoginMonitor monitor, Set<Principal> principals)
      throws AuthenticationException
  {
    Set<Object> attributes = new HashSet<>();
    NDC.push("SESSION");
    Result result = Result.FAIL;
    try {
      monitor.sessionBegins(principals);
      sessionStrategy.session(monitor, principals, attributes);
      result = Result.SUCCESS;
    } finally {
      NDC.pop();
      monitor.sessionEnds(principals, attributes, result);
    }
    return attributes;
  }
}
origin: dCache/dcache

void doMapPhase(LoginMonitor monitor, Set<Principal> principals)
    throws AuthenticationException
{
  NDC.push("MAP");
  Result result = Result.FAIL;
  try {
    monitor.mapBegins(principals);
    mapStrategy.map(monitor, principals);
    result = Result.SUCCESS;
  } finally {
    NDC.pop();
    monitor.mapEnds(principals, result);
  }
}
origin: dCache/dcache

void doAccountPhase(LoginMonitor monitor, Set<Principal> principals)
    throws AuthenticationException
{
  NDC.push("ACCOUNT");
  Result result = Result.FAIL;
  try {
    monitor.accountBegins(principals);
    accountStrategy.account(monitor, principals);
    result = Result.SUCCESS;
  } finally {
    NDC.pop();
    monitor.accountEnds(principals, result);
  }
}
origin: dCache/dcache

String name = getCellName() + '*';
Random random = new Random();
NDC.push(_address.toString());
try {
  while (_isRunning) {
origin: dCache/dcache

public LoginReply buildReply(LoginMonitor monitor, Subject originalSubject,
    Set<Principal> principals, Set<Object> attributes)
    throws AuthenticationException
{
  Set<Object> publicCredentials = originalSubject.getPublicCredentials();
  Set<Object> privateCredentials = originalSubject.getPrivateCredentials();
  LoginReply reply = new LoginReply();
  Subject subject = new Subject(false, principals, publicCredentials,
      privateCredentials);
  reply.setSubject(subject);
  reply.setSessionAttributes(attributes);
  Result result = Result.FAIL;
  String error = null;
  NDC.push("VALIDATION");
  try {
    validationStrategy.validate(reply);
    result = Result.SUCCESS;
  } catch(AuthenticationException e) {
    error = e.getMessage();
    throw e;
  } finally {
    NDC.pop();
    monitor.validationResult(result, error);
  }
  return reply;
}
origin: dCache/dcache

NDC.push(pluginElement.getName());
origin: dCache/dcache

@Override
public void messageArrived(MessageEvent me)
{
  if (me instanceof RoutedMessageEvent) {
    CellMessage msg = me.getMessage();
    try {
      _messagesToTunnel.increment();
      _output.writeObject(msg);
    } catch (IOException e) {
      NDC.push(_remoteDomainInfo.toString());
      try {
        kill();
        _log.warn("Error while sending message: {}", e.getMessage());
        NoRouteToCellException noRoute =
            new NoRouteToCellException(msg, "Communication failure. Message could not be delivered.");
        CellMessage envelope = new CellMessage(msg.getSourcePath().revert(), noRoute);
        envelope.setLastUOID(msg.getUOID());
        _nucleus.sendMessage(envelope, true, true, true);
      } finally {
        NDC.pop();
      }
    }
  } else {
    super.messageArrived(me);
  }
}
org.dcache.utilNDCpush

Javadoc

Push new diagnostic context information for the current thread.

Popular methods of NDC

  • pop
    Removes the diagnostic context information pushed the last. Clients should call this method before l
  • cloneNdc
    Returns the nested diagnostic context for the current thread.
  • set
    Replace the nested diagnostic context.
  • <init>
  • clear
    Clear any nested diagnostic information if any.
  • getNdc
  • getPositions
  • setMdc
    Wrapper around MDC.put andMDC.remove. value is allowed to be null.

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • getSystemService (Context)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now