Package com.hazelcast.core

Examples of com.hazelcast.core.HazelcastException


        LOGGER.info("Loading 'hazelcast-client.xml' from working directory.");
        try {
            in = new FileInputStream(file);
        } catch (FileNotFoundException e) {
            throw new HazelcastException("Failed to open file: " + file.getAbsolutePath(), e);
        }
        return true;
    }
View Full Code Here


        File configurationFile = new File(configSystemProperty);
        LOGGER.info("Using configuration file at " + configurationFile.getAbsolutePath());

        if (!configurationFile.exists()) {
            String msg = "Config file at '" + configurationFile.getAbsolutePath() + "' doesn't exist.";
            throw new HazelcastException(msg);
        }

        try {
            in = new FileInputStream(configurationFile);
        } catch (FileNotFoundException e) {
            throw new HazelcastException("Failed to open file: " + configurationFile.getAbsolutePath(), e);
        }
    }
View Full Code Here

        String resource = configSystemProperty.substring("classpath:".length());

        LOGGER.info("Using classpath resource at " + resource);

        if (resource.isEmpty()) {
            throw new HazelcastException("classpath resource can't be empty");
        }

        in = Config.class.getClassLoader().getResourceAsStream(resource);
        if (in == null) {
            throw new HazelcastException("Could not load classpath resource: " + resource);
        }
    }
View Full Code Here

    public Object receive() throws IOException {
        Packet packet;
        try {
            packet = (Packet) connection.q.take();
        } catch (InterruptedException e) {
            throw new HazelcastException(e);
        }
        ClientResponse clientResponse = serializationService.toObject(packet.getData());
        return serializationService.toObject(clientResponse.getResponse());
    }
View Full Code Here

            }

            ICompletableFuture<Result> future = reducingJob.submit(collator);
            return future.get();
        } catch (Exception e) {
            throw new HazelcastException(e);
        }
    }
View Full Code Here

                    continue;
                }
                Operation operation = new InvalidateNearCacheOperation(mapName, key).setServiceName(MapService.SERVICE_NAME);
                nodeEngine.getOperationService().send(operation, member.getAddress());
            } catch (Throwable throwable) {
                throw new HazelcastException(throwable);
            }
        }
        // below local invalidation is for the case the data is cached before partition is owned/migrated
        invalidateNearCache(mapName, key);
    }
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

        this.transactionManager = transactionManager;
        this.client = transactionManager.getClient();
        try {
            this.connection = client.getConnectionManager().tryToConnect(null);
        } catch (Exception e) {
            throw new HazelcastException("Could not obtain Connection!!!", e);
        }
        this.transaction = new TransactionProxy(client, options, connection);
    }
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

        final BlockingQueue b = ResponseQueueFactory.newResponseQueue();

        @Override
        public void sendResponse(Object obj) {
            if (!b.offer(obj)) {
                throw new HazelcastException("Response could not be queued for transportation");
            }
        }
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.