Refine search
@Override public void end(Xid xid, int flags) throws XAException { long threadId = currentThreadId(); TransactionContext threadContext = threadContextMap.remove(threadId); if (threadContext == null && logger.isFinestEnabled()) { logger.finest("There is no TransactionContext for the current thread: " + threadId); } List<TransactionContext> contexts = xidContextMap.get(xid); if (contexts == null && logger.isFinestEnabled()) { logger.finest("There is no TransactionContexts for the given xid: " + xid); } }
@Override public void handleException(Throwable throwable) { if (throwable instanceof MemberLeftException) { if (LOGGER.isFinestEnabled()) { LOGGER.finest("Member left while waiting for futures...", throwable); } } } };
private void log(String msg, Throwable t) { if (logger.isFinestEnabled()) { logger.finest(msg, t); } else { logger.info(msg); } }
private static void logFailureToFindUnsafeDueTo(final Throwable reason) { if (LOGGER.isFinestEnabled()) { LOGGER.finest("Unable to get an instance of Unsafe. Unsafe-based operations will be unavailable", reason); } else { LOGGER.warning("Unable to get an instance of Unsafe. Unsafe-based operations will be unavailable"); } } }
private void updateSessionMaps(String sessionId, HttpSession originalSession, HazelcastHttpSession hazelcastSession) { sessions.put(hazelcastSession.getId(), hazelcastSession); String oldHazelcastSessionId = originalSessions.put(originalSession.getId(), hazelcastSession.getId()); if (LOGGER.isFinestEnabled()) { if (oldHazelcastSessionId != null) { LOGGER.finest("!!! Overwrote an existing hazelcastSessionId " + oldHazelcastSessionId); } LOGGER.finest("Created new session with id: " + sessionId); LOGGER.finest(sessions.size() + " is sessions.size and originalSessions.size: " + originalSessions.size()); } }
public void enqueueSuspended(ScheduledTaskDescriptor descriptor, boolean force) { if (logger.isFinestEnabled()) { log(FINEST, "Enqueuing suspended, i.e., backup: " + descriptor.getDefinition()); } if (force || !tasks.containsKey(descriptor.getDefinition().getName())) { tasks.put(descriptor.getDefinition().getName(), descriptor); } }
@Override public void blacklist(Address address, boolean permanent) { logger.info(address + " is added to the blacklist."); blacklistedAddresses.putIfAbsent(address, permanent); }
void promoteSuspended() { if (logger.isFinestEnabled()) { logger.finest("[Partition: " + partitionId + "] " + "Promote suspended"); } for (ScheduledExecutorContainer container : containers.values()) { container.promoteSuspended(); } } }
public synchronized void shutdown(boolean terminate) { logger.finest("Stopping services..."); final List<ManagedService> managedServices = getServices(ManagedService.class); // reverse order to stop CoreServices last Collections.reverse(managedServices); services.clear(); for (ManagedService service : managedServices) { shutdownService(service, terminate); } }
@Override public final void join() { blacklistedAddresses.clear(); doJoin(); if (!clusterService.isJoined() && shouldResetHotRestartData()) { logger.warning("Could not join to the cluster because hot restart data must be reset."); node.getNodeExtension().getInternalHotRestartService().resetHotRestartData(); reset(); doJoin(); } postJoin(); }
private void printVariables() { logger.info("Starting Test with "); logger.info("Thread Count: " + threadCount); logger.info("Entry Count: " + entryCount); logger.info("Value Size: " + valueSize); logger.info("Get Percentage: " + getPercentage); logger.info("Put Percentage: " + putPercentage); logger.info("Remove Percentage: " + (100 - (putPercentage + getPercentage))); logger.info("Load: " + load); } }
private void logWithStackTrace(SlowOperationLog log, int totalInvocations) { if (totalInvocations == 1) { logger.warning(format("Slow operation detected: %s%n%s", log.operation, log.stackTrace)); } else { // print the full stack trace each FULL_LOG_FREQUENCY invocations logger.warning(format("Slow operation detected: %s (%d invocations)%n%s", log.operation, totalInvocations, (totalInvocations % FULL_LOG_FREQUENCY == 0) ? log.stackTrace : log.shortStackTrace)); } }
private Collection<String> resolveDomainNames(String domainName) throws UnknownHostException { Collection<String> addresses = hostnameResolver.resolve(domainName); logger.warning("You configured your member address as host name. " + "Please be aware of that your dns can be spoofed. " + "Make sure that your dns configurations are correct."); logger.info("Resolving domain name '" + domainName + "' to address(es): " + addresses); return addresses; }
private void shutdownService(final ManagedService service, final boolean terminate) { try { if (logger.isFinestEnabled()) { logger.finest("Shutting down service -> " + service); } service.shutdown(terminate); } catch (Throwable t) { logger.severe("Error while shutting down service[" + service + "]: " + t.getMessage(), t); } }
private void waitMergeEnd(int mergedCount) { try { long timeoutMillis = Math.max(mergedCount * TIMEOUT_FACTOR, MINIMAL_TIMEOUT_MILLIS); if (!semaphore.tryAcquire(mergedCount, timeoutMillis, MILLISECONDS)) { logger.warning("Split-brain healing didn't finish within the timeout..."); } } catch (InterruptedException e) { logger.finest("Interrupted while waiting for split-brain healing..."); Thread.currentThread().interrupt(); } }