Package com.hazelcast.core

Examples of com.hazelcast.core.HazelcastInstanceNotActiveException


     * @throws HazelcastInstanceNotActiveException if object is destroyed or HazelcastInstance shutdown.
     */
    public final S getService() {
        final S s = service;
        if (s == null) {
            throw new HazelcastInstanceNotActiveException();
        }
        return s;
    }
View Full Code Here


                if (deadline <= 0) {
                    throw te;
                }
                if (!node.isActive()) {
                    future.cancel(true);
                    throw new HazelcastInstanceNotActiveException();
                }
            }
        }
    }
View Full Code Here

            final SerializerAdapter serializer = serializerFor(obj.getClass());
            if (serializer == null) {
                if (active) {
                    throw new HazelcastSerializationException("There is no suitable serializer for " + obj.getClass());
                }
                throw new HazelcastInstanceNotActiveException();
            }
            final byte[] bytes = serializer.write(obj);
            final Data data = new Data(serializer.getTypeId(), bytes);
            if (obj instanceof Portable) {
                final Portable portable = (Portable) obj;
View Full Code Here

        final SerializerAdapter serializer = serializerFor(typeId);
        if (serializer == null) {
            if (active) {
                throw new HazelcastSerializationException("There is no suitable de-serializer for type " + typeId);
            }
            throw new HazelcastInstanceNotActiveException();
        }
        if (typeId == SerializationConstants.CONSTANT_TYPE_PORTABLE) {
            serializationContext.registerClassDefinition(data.classDefinition);
        }
        return serializer.read(data);
View Full Code Here

            final SerializerAdapter serializer = serializerFor(obj.getClass());
            if (serializer == null) {
                if (active) {
                    throw new HazelcastSerializationException("There is no suitable serializer for " + obj.getClass());
                }
                throw new HazelcastInstanceNotActiveException();
            }
            out.writeInt(serializer.getTypeId());
            if (obj instanceof Portable) {
                final Portable portable = (Portable) obj;
                ClassDefinition classDefinition = serializationContext.lookupOrRegisterClassDefinition(portable);
View Full Code Here

            final SerializerAdapter serializer = serializerFor(typeId);
            if (serializer == null) {
                if (active) {
                    throw new HazelcastSerializationException("There is no suitable de-serializer for type " + typeId);
                }
                throw new HazelcastInstanceNotActiveException();
            }
            if (typeId == SerializationConstants.CONSTANT_TYPE_PORTABLE && in instanceof PortableContextAwareInputStream) {
                ClassDefinition classDefinition = new ClassDefinitionImpl();
                classDefinition.readData(in);
                classDefinition = serializationContext.registerClassDefinition(classDefinition);
View Full Code Here

            if (op.returnsResponse() && responseHandler != null) {
                try {
                    if (node.isActive()) {
                        responseHandler.sendResponse(e);
                    } else if (responseHandler.isLocal()) {
                        responseHandler.sendResponse(new HazelcastInstanceNotActiveException());
                    }
                } catch (Throwable t) {
                    logger.warning("While sending op error... op: " + op + ", error: " + e, t);
                }
            }
View Full Code Here

            Object service = nodeEngine.getService(serviceName);
            if (service == null) {
                if (nodeEngine.isActive()) {
                    throw new IllegalArgumentException("No service registered with name: " + serviceName);
                }
                throw new HazelcastInstanceNotActiveException();
            }
            request.setService(service);
        }
View Full Code Here

            if (nodeEngine.isActive()) {
                String message = "Client " + endpoint + " must authenticate before any operation.";
                logger.severe(message);
                exception = new AuthenticationException(message);
            } else {
                exception = new HazelcastInstanceNotActiveException();
            }
            endpoint.sendResponse(exception, request.getCallId());
            endpointManager.removeEndpoint(endpoint);
        }
View Full Code Here

    }

    private boolean engineActive() {
        if (!nodeEngine.isActive()) {
            remote = false;
            notify(new HazelcastInstanceNotActiveException());
            return false;
        }
        return true;
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.core.HazelcastInstanceNotActiveException

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.