Package com.hazelcast.logging

Examples of com.hazelcast.logging.ILogger


        }
    }

    private void logException(Operation op, Throwable e) {
        NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        ILogger logger = nodeEngine.getLogger(getClass());
        Level level = nodeEngine.isActive() ? Level.WARNING : Level.FINEST;
        if (logger.isLoggable(level)) {
            logger.log(level, "While executing " + op, e);
        }
    }
View Full Code Here


        }
    }

    private void logApplyReplicaSync(int partitionId, int replicaIndex) {
        NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        ILogger logger = nodeEngine.getLogger(getClass());
        if (logger.isFinestEnabled()) {
            logger.finest("Applying replica sync for partition: " + partitionId + ", replica: " + replicaIndex);
        }
    }
View Full Code Here

        InternalPartitionService partitionService = getService();
        partitionService.clearPartitionReplicaVersions(partitionId);
    }

    private void logMigrationError(Throwable e) {
        ILogger logger = getLogger();
        logger.warning("While clearing partition data: " + getPartitionId(), e);
    }
View Full Code Here

        Operation operation = new UnlockOperation(namespace, key, -1, true);
        try {
            Future f = invoke(operation, key);
            futures.add(f);
        } catch (Throwable t) {
            ILogger logger = nodeEngine.getLogger(getClass());
            logger.warning(t);
        }
    }
View Full Code Here

            logger.warning(t);
        }
    }

    private void awaitCompletion(Collection<Future> futures) {
        ILogger logger = nodeEngine.getLogger(getClass());

        for (Future future : futures) {
            try {
                future.get(AWAIT_COMPLETION_TIMEOUT_SECONDS, TimeUnit.SECONDS);
            } catch (TimeoutException e) {
                logger.finest(e);
            } catch (Exception e) {
                logger.warning(e);
            }
        }
    }
View Full Code Here

    private void logMigrationFailure(Throwable e) {
        Level level = Level.WARNING;
        if (e instanceof IllegalStateException) {
            level = Level.FINEST;
        }
        ILogger logger = getLogger();
        if (logger.isLoggable(level)) {
            logger.log(level, e.getMessage(), e);
        }
    }
View Full Code Here

        final NodeEngine ne = nodeEngine;
        return ne != null ? ne.getLogger(getClass()) : Logger.getLogger(getClass());
    }

    public void logError(Throwable e) {
        final ILogger logger = getLogger();
        if (e instanceof RetryableException) {
            final Level level = returnsResponse() ? Level.FINEST : Level.WARNING;
            if (logger.isLoggable(level)) {
                logger.log(level, e.getClass().getName() + ": " + e.getMessage());
            }
        } else if (e instanceof OutOfMemoryError) {
            try {
                logger.log(Level.SEVERE, e.getMessage(), e);
            } catch (Throwable ignored) {
                ignore(ignored);
            }
        } else {
            final Level level = nodeEngine != null && nodeEngine.isActive() ? Level.SEVERE : Level.FINEST;
            if (logger.isLoggable(level)) {
                logger.log(level, e.getMessage(), e);
            }
        }
    }
View Full Code Here

    public void run() {
        final Address caller = getCallerAddress();
        final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        final Node node = nodeEngine.getNode();
        final Address masterAddress = node.getMasterAddress();
        final ILogger logger = node.loggingService.getLogger(this.getClass().getName());
        boolean local = caller == null;
        if (!local && !caller.equals(masterAddress)) {
            logger.warning("Prepare-merge instruction sent from non-master endpoint: " + caller);
            return;
        }
        logger.warning("Preparing to merge... Waiting for merge instruction...");
        node.getClusterService().prepareToMerge(newTargetAddress);
    }
View Full Code Here

        Operation operation = new UnlockOperation(namespace, key, -1, true);
        try {
            Future f = invoke(operation, key);
            futures.add(f);
        } catch (Throwable t) {
            ILogger logger = nodeEngine.getLogger(getClass());
            logger.warning(t);
        }
    }
View Full Code Here

    private void awaitCompletion(Collection<Future> futures) {
        try {
            FutureUtil.waitWithDeadline(futures, AWAIT_COMPLETION_TIMEOUT_SECONDS, TimeUnit.SECONDS, exceptionHandler);
        } catch (TimeoutException e) {
            ILogger logger = nodeEngine.getLogger(getClass());
            logger.finest(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.logging.ILogger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.