Package com.hazelcast.logging

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


        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

    }

    @Override
    public void run() throws Exception {
        if (!recordStore.extendLock(getKey(), ownerUuid, getThreadId(), LOCK_TTL_MILLIS)) {
            ILogger logger = getLogger();
            logger.severe(recordStore.isLocked(getKey()) + ":" + getKey());
            throw new TransactionException("Lock is not owned by the transaction! Owner: "
                    + recordStore.getLockOwnerInfo(getKey()));
        }
    }
View Full Code Here

                OperationService os = nodeEngine.getOperationService();
                os.send(operation, jobOwner);
            }
        } catch (Exception e) {
            ILogger logger = nodeEngine.getLogger(MapReduceUtil.class);
            logger.warning("Could not notify remote map-reduce owner", e);
        }
    }
View Full Code Here

                    RecoveredTransaction rt = serializationService.toObject(data);
                    service.addClientRecoveredTransaction(rt);
                    xids.add(serializationService.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

    }

    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

                    }
                });
            }
            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

        this.durability = options.getDurability();
        this.transactionType = options.getTransactionType();
        this.txOwnerUuid = txOwnerUuid == null ? nodeEngine.getLocalMember().getUuid() : txOwnerUuid;
        this.checkThreadAccess = txOwnerUuid == null;

        ILogger logger = nodeEngine.getLogger(getClass());
        this.commitExceptionHandler = logAllExceptions(logger, "Error during commit!", Level.WARNING);
        this.rollbackExceptionHandler = logAllExceptions(logger, "Error during rollback!", Level.WARNING);
        this.rollbackTxExceptionHandler = logAllExceptions(logger, "Error during tx rollback backup!", Level.WARNING);
    }
View Full Code Here

        this.txLogs.addAll(txLogs);
        this.state = PREPARED;
        this.txOwnerUuid = txOwnerUuid;
        this.checkThreadAccess = false;

        ILogger logger = nodeEngine.getLogger(getClass());
        this.commitExceptionHandler = logAllExceptions(logger, "Error during commit!", Level.WARNING);
        this.rollbackExceptionHandler = logAllExceptions(logger, "Error during rollback!", Level.WARNING);
        this.rollbackTxExceptionHandler = logAllExceptions(logger, "Error during tx rollback backup!", Level.WARNING);
    }
View Full Code Here

                CancelJobSupervisorOperation operation = new CancelJobSupervisorOperation(name, jobId);
                mapReduceService.processRequest(address, operation, name);
            } catch (Exception ignore) {
                // We can ignore this exception since we just want to cancel the job
                // and the member may be crashed or unreachable in some way
                ILogger logger = mapReduceService.getNodeEngine().getLogger(JobSupervisor.class);
                logger.finest("Remote node may already be down", ignore);
            }
        }
    }
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.