/** * {@inheritDoc} * * @see org.modeshape.graph.connector.RepositoryConnection#close() */ public void close() { if (stopwatch != null) { LOGGER.trace("Processing federated requests:\n" + stopwatch.getDetailedStatistics()); } // do nothing else, since we don't currently hold any state }
/** * {@inheritDoc} * * @see org.modeshape.graph.request.processor.RequestProcessor#process(org.modeshape.graph.request.CreateNodeRequest) */ @Override public void process( CreateNodeRequest request ) { LOGGER.log(level, GraphI18n.executingRequest, request); delegate.process(request); LOGGER.log(level, GraphI18n.executedRequest, request); }
protected byte[] computeHash( byte[] content ) { try { return SecureHash.getHash(ALGORITHM, content); } catch (NoSuchAlgorithmException e) { if (ALGORITHMS_NOT_FOUND_AND_LOGGED.add(ALGORITHM.digestName())) { Logger.getLogger(getClass()).error(e, GraphI18n.messageDigestNotFound, ALGORITHM.digestName()); } return NO_HASH; } }
final Logger logger = Logger.getLogger(getClass()); Queue<GarbageCollectedSource> sourcesToGc = new LinkedList<GarbageCollectedSource>(); for (RepositorySource source : getRepositoryLibrary().getSources()) { try { logger.debug("Garbage collection requested for {0}", source.getName()); CollectGarbageRequest request = new CollectGarbageRequest(); connection.execute(context, request); logger.debug("Garbage collection partially completed for {0}; enqueuing again", source.getName()); } else { logger.debug("Garbage collection completed for {0}", source.getName()); problems.addError(t, msg, source.getName(), t.getMessage()); } else { logger.error(msg, source.getName(), t.getMessage());
assert original != null; try { LOGGER.debug("Closing repository connection to {0} ({1} open connections remain)", getSourceName(), poolSize); original.close(); } finally { LOGGER.trace("Signalling termination of repository connection pool for {0}", getSourceName()); this.runState = TERMINATED; this.termination.signalAll(); LOGGER.trace("Terminated repository connection pool for {0}", getSourceName());
/** * Return a logger associated with this context. This logger records only those activities within the context and provide a * way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log * via this mechanism should <i>not</i> also {@link Logger#getLogger(Class) obtain a system logger}. * * @param clazz the class that is doing the logging * @return the logger, named after <code>clazz</code>; never null * @see #getLogger(String) */ public Logger getLogger( Class<?> clazz ) { return Logger.getLogger(clazz); }
if (logger.isDebugEnabled()) { logger.trace("Skipping '{0}': no sequencers matched this condition", change); sequencerContext.getDestination().submit(); } catch (SequencerException e) { logger.error(e, RepositoryI18n.errorWhileSequencingNode, sequencerName, change); logger.error(RepositoryI18n.problemsWhileSequencingNode, sequencerName, change); problems.writeTo(logger); logger.error(e, RepositoryI18n.errorFindingSequencersToRunAgainstNode, changes);
if (logger.isTraceEnabled()) { String msg = "Success parsing project rule definition \"{0}\" using {1}"; logger.trace(msg, definition, method); } else if (logger.isTraceEnabled()) { String msg = "Unable to parse project rule definition \"{0}\" using {1}"; logger.trace(msg, definition, method); logger.trace(error, msg, definition, method);
/** * {@inheritDoc} * * @see org.modeshape.graph.observe.Observer#notify(org.modeshape.graph.observe.Changes) */ public void notify( Changes changes ) { if (changes != null) { // Broadcast the changes to the registered observers ... try { observers.broadcast(changes); } catch (RuntimeException t) { LOGGER.error(t, GraphI18n.errorNotifyingObserver, t.getLocalizedMessage()); } } }
private String initialize( Subject subject ) { String userName = null; if (subject != null) { for (Principal principal : subject.getPrincipals()) { if (principal instanceof Group) { Group group = (Group)principal; Enumeration<? extends Principal> roles = group.members(); while (roles.hasMoreElements()) { Principal role = roles.nextElement(); entitlements.add(role.getName()); } } else { userName = principal.getName(); LOGGER.debug("Adding principal user name: " + userName); } } } return userName; }
logger().warn(RepositoryI18n.clusteringConfigurationRequiresClusterName); problems.addWarning(RepositoryI18n.clusteringConfigurationRequiresClusterName); return null; // Signifies no clustering
/** * {@inheritDoc SecurityContext#logout()} * * @see SecurityContext#logout() */ public void logout() { try { loggedIn = false; if (loginContext != null) loginContext.logout(); } catch (LoginException le) { LOGGER.info(le, null); } }
protected byte[] computeHash( InputStream stream ) { try { return SecureHash.getHash(ALGORITHM, stream); } catch (NoSuchAlgorithmException e) { if (ALGORITHMS_NOT_FOUND_AND_LOGGED.add(ALGORITHM.digestName())) { Logger.getLogger(getClass()).error(e, GraphI18n.messageDigestNotFound, ALGORITHM.digestName()); } return NO_HASH; } catch (IOException e) { if (ALGORITHMS_NOT_FOUND_AND_LOGGED.add(ALGORITHM.digestName())) { Logger.getLogger(getClass()).error(e, GraphI18n.messageDigestNotFound, ALGORITHM.digestName()); } return NO_HASH; } }
if (security != null) java.security.AccessController.checkPermission(shutdownPerm); LOGGER.debug("Shutting down repository connection pool for {0}", getSourceName()); boolean fullyTerminated = false; final ReentrantLock mainLock = this.mainLock; LOGGER.trace("Signalling termination of repository connection pool for {0}", getSourceName()); runState = TERMINATED; termination.signalAll(); LOGGER.debug("Terminated repository connection pool for {0}", getSourceName());
/** * Return a logger associated with this context. This logger records only those activities within the context and provide a * way to capture the context-specific activities. All log messages are also sent to the system logger, so classes that log * via this mechanism should <i>not</i> also {@link Logger#getLogger(Class) obtain a system logger}. * * @param name the name for the logger * @return the logger, named after <code>clazz</code>; never null * @see #getLogger(Class) */ public Logger getLogger( String name ) { return Logger.getLogger(name); }
Logger logger = context.getLogger(getClass()); Stopwatch sw = null; if (logger.isTraceEnabled()) { sw = new Stopwatch(); sw.start(); if (logger.isTraceEnabled()) { assert sw != null; sw.stop(); logger.trace(getClass().getSimpleName() + ".execute(...) took " + sw.getTotalDuration());