Examples of ILogger


Examples of com.hazelcast.logging.ILogger

    public void run() {
        final ClusterServiceImpl clusterService = getService();
        final Address caller = getCallerAddress();
        if (caller != null &&
                (caller.equals(deadAddress) || caller.equals(clusterService.getMasterAddress()))) {
            ILogger logger = getLogger();
            if (logger.isFinestEnabled()) {
                logger.finest( "Removing " + deadAddress + ", called from " + caller);
            }
            clusterService.removeAddress(deadAddress);
        }
    }
View Full Code Here

Examples of com.hazelcast.logging.ILogger

                    RecoveredTransaction rt = (RecoveredTransaction) clientEngine.toObject(data);
                    service.addClientRecoveredTransaction(rt);
                    xids.add(clientEngine.toData(rt.getXid()));
                }
            } catch (MemberLeftException e) {
                ILogger logger = clientEngine.getLogger(RecoverAllTransactionsRequest.class);
                logger.warning("Member left while recovering: " + e);
            } catch (Throwable e) {
                handleException(clientEngine, e);
            }
        }
        ClientEndpoint endpoint = getEndpoint();
View Full Code Here

Examples of com.hazelcast.logging.ILogger

    }

    private void handleException(ClientEngine clientEngine, Throwable e) {
        Throwable cause = getCause(e);
        if (cause instanceof TargetNotMemberException) {
            ILogger logger = clientEngine.getLogger(RecoverAllTransactionsRequest.class);
            logger.warning("Member left while recovering: " + cause);
        } else {
            throw ExceptionUtil.rethrow(e);
        }
    }
View Full Code Here

Examples of com.hazelcast.logging.ILogger

            response = false;
        }
    }

    private void logBackupVersionMismatch(long currentVersion) {
        ILogger logger = getLogger();
        if (logger.isFinestEnabled()) {
            logger.finest("Partition: " + getPartitionId() + " version is not matching to version of the owner -> "
                    + currentVersion + " -vs- " + version);
        }
    }
View Full Code Here

Examples of com.hazelcast.logging.ILogger

        this.mapName = mapName;
    }

    public void process(EntryTaskScheduler<Data, Object> scheduler, Collection<ScheduledEntry<Data, Object>> entries) {
        final Collection<Future> futures = new ArrayList<Future>(entries.size());
        final ILogger logger = nodeEngine.getLogger(getClass());

        for (ScheduledEntry<Data, Object> entry : entries) {
            Data key = entry.getKey();
            int partitionId = nodeEngine.getPartitionService().getPartitionId(key);
                // execute eviction if the node is owner of the key (it can be backup)
            if (nodeEngine.getThisAddress().equals(nodeEngine.getPartitionService().getPartitionOwner(partitionId))) {
                Operation operation = new EvictOperation(mapName, key, true);
                try {
                    Future f = nodeEngine.getOperationService().invokeOnPartition(SERVICE_NAME, operation, partitionId);
                    futures.add(f);
                } catch (Throwable t) {
                    logger.warning(t);
                }
            }
        }
        for (Future future : futures) {
            try {
                future.get(30, TimeUnit.SECONDS);
            } catch (TimeoutException e) {
                logger.finest(e);
            } catch (Exception e) {
                logger.warning(e);
            }
        }
    }
View Full Code Here

Examples of com.hazelcast.logging.ILogger

                    }
                });
            }
            esStats.submit(new Runnable() {
                public void run() {
                    final ILogger logger = hazelcast.getLoggingService().getLogger(hazelcast.getName());
                    while (running) {
                        try {
                            Thread.sleep(STATS_SECONDS * 1000);
                            int clusterSize = hazelcast.getCluster().getMembers().size();
                            Stats currentStats = stats.getAndReset();
                            logger.info("Cluster size: " + clusterSize + ", Operations per Second: "
                                    + (currentStats.total() / STATS_SECONDS));
                        } catch (HazelcastInstanceNotActiveException e) {
                            throw new RuntimeException(e);
                        } catch (Exception e) {
                            throw new RuntimeException(e);
View Full Code Here

Examples of com.hazelcast.logging.ILogger

        InternalPartitionImpl partition = partitionService.getPartition(partitionId);
        Address owner = partition.getOwner();
        long[] replicaVersions = partitionService.getPartitionReplicaVersions(partitionId);
        long currentVersion = replicaVersions[replicaIndex - 1];

        ILogger logger = getLogger();

        if (!nodeEngine.getThisAddress().equals(owner)) {
            if (logger.isFinestEnabled()) {
                logger.finest("Wrong target! " + toString() + " cannot be processed! Target should be: " + owner);
            }
            sendRetryResponse();
            return;
        }

        if (currentVersion == 0) {
            sendEmptyResponse();
            return;
        }

        if (!partitionService.incrementReplicaSyncProcessCount()) {
            if (logger.isFinestEnabled()) {
                logger.finest(
                        "Max parallel replication process limit exceeded! Could not run replica sync -> " + toString());
            }
            sendRetryResponse();
            return;
        }
View Full Code Here

Examples of com.hazelcast.logging.ILogger

    private void sendResponse(byte[] data) throws IOException {
        NodeEngine nodeEngine = getNodeEngine();

        ReplicaSyncResponse syncResponse = createResponse(data);
        Address target = getCallerAddress();
        ILogger logger = getLogger();
        if (logger.isFinestEnabled()) {
            logger.finest("Sending sync response to -> " + target + " for partition: "
                    + getPartitionId() + ", replica: " + getReplicaIndex());
        }
        OperationService operationService = nodeEngine.getOperationService();
        operationService.send(syncResponse, target);
    }
View Full Code Here

Examples of com.hazelcast.logging.ILogger

        return syncResponse;
    }

    private void logNoReplicaDataFound(int partitionId, int replicaIndex) {
        NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
        ILogger logger = nodeEngine.getLogger(getClass());

        if (logger.isFinestEnabled()) {
            logger.finest("No replica data is found for partition: " + partitionId + ", replica: " + replicaIndex);
        }
    }
View Full Code Here

Examples of com.hazelcast.logging.ILogger

        }
        getEndpoint().sendResponse(result, getCallId());
    }

    private void logException(Exception e) {
        ILogger logger = getClientEngine().getLogger(CancellationRequest.class);
        logger.warning(e);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.