Package com.hazelcast.core

Examples of com.hazelcast.core.HazelcastException


        // TODO: @mm - operations those do not return response can cause memory leaks! Call->Invocation->Operation->Data
        private void notifyRemoteCall(NormalResponse response) {
            RemoteCall call = deregisterRemoteCall(response.getCallId());
            if (call == null) {
                throw new HazelcastException("No call for response:" + response);
            }

            call.offerResponse(response);
        }
View Full Code Here


            } catch (InterruptedException ignored) {
            } catch (TimeoutException ignored) {
            } catch (MemberLeftException e) {
                logger.finest("Member left while registering listener...", e);
            } catch (ExecutionException e) {
                throw new HazelcastException(e);
            }
        }
    }
View Full Code Here

            } catch (InterruptedException ignored) {
            } catch (TimeoutException ignored) {
            } catch (MemberLeftException e) {
                logger.finest("Member left while de-registering listener...", e);
            } catch (ExecutionException e) {
                throw new HazelcastException(e);
            }
        }
    }
View Full Code Here

    public boolean isCompatible(ConfigCheck other) {
        if (!groupName.equals(other.groupName)) {
            return false;
        }
        if (!groupPassword.equals(other.groupPassword)) {
            throw new HazelcastException("Incompatible group password!");
        }
        if (!joinerType.equals(other.joinerType)) {
            throw new HazelcastException("Incompatible joiners! " + joinerType + " -vs- " + other.joinerType);
        }
        if (!partitionGroupEnabled && other.partitionGroupEnabled
                || partitionGroupEnabled && !other.partitionGroupEnabled) {
            throw new HazelcastException("Incompatible partition groups! "
                    + "this: " + (partitionGroupEnabled ? "enabled" : "disabled") + " / " + memberGroupType
                    + ", other: " + (other.partitionGroupEnabled ? "enabled" : "disabled")
                    + " / " + other.memberGroupType);
        }
        if (partitionGroupEnabled && memberGroupType != other.memberGroupType) {
            throw new HazelcastException("Incompatible partition groups! this: " + memberGroupType + ", other: "
                    + other.memberGroupType);
        }
        return true;
    }
View Full Code Here

            // one might have overridden getServiceName() method...
            final String name = serviceName != null ? serviceName : getServiceName();
            service = ((NodeEngineImpl) nodeEngine).getService(name);
            if (service == null) {
                if (nodeEngine.isActive()) {
                    throw new HazelcastException("Service with name '" + name + "' not found!");
                } else {
                    throw new RetryableHazelcastException("HazelcastInstance[" + nodeEngine.getThisAddress()
                            + "] is not active!");
                }
            }
View Full Code Here

    public void handle(IncrementCommand incrementCommand) {
        String key = null;
        try {
            key = URLDecoder.decode(incrementCommand.getKey(), "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new HazelcastException(e);
        }
        String mapName = DEFAULT_MAP_NAME;
        int index = key.indexOf(':');
        if (index != -1) {
            mapName = MAP_NAME_PRECEDER + key.substring(0, index);
View Full Code Here

    public void handle(SetCommand setCommand) {
        String key = null;
        try {
            key = URLDecoder.decode(setCommand.getKey(), "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new HazelcastException(e);
        }
        String mapName = DEFAULT_MAP_NAME;
        int index = key.indexOf(':');
        if (index != -1) {
            mapName = MAP_NAME_PRECEDER + key.substring(0, index);
View Full Code Here

                newMembers[k++] = member;
                member.didRead();
            }
            setMembers(newMembers);
            if (!getMemberList().contains(thisMember)) {
                throw new HazelcastException("Member list doesn't contain local member!");
            }
            joinReset();
            heartBeater();
            node.setJoined();
            logger.info(membersString());
View Full Code Here

        @Override
        public void handleException(Throwable throwable) {
            if (throwable instanceof MemberLeftException) {
                logger.finest(message, throwable);
            } else if (throwable instanceof ExecutionException) {
                throw new HazelcastException(throwable);
            }
        }
View Full Code Here

        final ServiceInfo serviceInfo = new ServiceInfo(serviceName, service);
        final ServiceInfo currentServiceInfo = services.putIfAbsent(serviceName, serviceInfo);
        if (currentServiceInfo != null) {
            logger.warning("Replacing " + currentServiceInfo + " with " + serviceInfo);
            if (currentServiceInfo.isCoreService()) {
                throw new HazelcastException("Can not replace a CoreService! Name: " + serviceName
                        + ", Service: " + currentServiceInfo.getService());
            }
            if (currentServiceInfo.isManagedService()) {
                shutdownService((ManagedService) currentServiceInfo.getService(), false);
            }
View Full Code Here

TOP

Related Classes of com.hazelcast.core.HazelcastException

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.