Package com.hazelcast.core

Examples of com.hazelcast.core.HazelcastException


        }
        if (store.isEnabled()) {
            try {
                store.delete(item.getItemId());
            } catch (Exception e) {
                throw new HazelcastException(e);
            }
        }
        getItemQueue().poll();
        age(item, Clock.currentTimeMillis());
        scheduleEvictionIfEmpty();
View Full Code Here


            QueueItem item = iter.next();
            if (store.isEnabled() && item.getData() == null) {
                try {
                    load(item);
                } catch (Exception e) {
                    throw new HazelcastException(e);
                }
            }
            map.put(item.getItemId(), item.getData());
        }
        if (store.isEnabled() && maxSize != 0) {
            try {
                store.deleteAll(map.keySet());
            } catch (Exception e) {
                throw new HazelcastException(e);
            }
        }
        long current = Clock.currentTimeMillis();
        for (int i = 0; i < maxSize; i++) {
            QueueItem item = getItemQueue().poll();
View Full Code Here

        }
        if (store.isEnabled() && !map.isEmpty()) {
            try {
                store.deleteAll(map.keySet());
            } catch (Exception e) {
                throw new HazelcastException(e);
            }
        }
        getItemQueue().clear();
        dataMap.clear();
        scheduleEvictionIfEmpty();
View Full Code Here

            if (data.equals(item.getData())) {
                if (store.isEnabled()) {
                    try {
                        store.delete(item.getItemId());
                    } catch (Exception e) {
                        throw new HazelcastException(e);
                    }
                }
                iter.remove();
                age(item, Clock.currentTimeMillis()); //For Stats
                scheduleEvictionIfEmpty();
View Full Code Here

        for (QueueItem item : getItemQueue()) {
            if (store.isEnabled() && item.getData() == null) {
                try {
                    load(item);
                } catch (Exception e) {
                    throw new HazelcastException(e);
                }
            }
            dataList.add(item.getData());
        }
        return dataList;
View Full Code Here

        for (QueueItem item : getItemQueue()) {
            if (item.getData() == null && store.isEnabled()) {
                try {
                    load(item);
                } catch (Exception e) {
                    throw new HazelcastException(e);
                }
            }
            boolean contains = dataList.contains(item.getData());
            if ((retain && !contains) || (!retain && contains)) {
                map.put(item.getItemId(), item.getData());
            }
        }
        if (map.size() > 0) {
            if (store.isEnabled()) {
                try {
                    store.deleteAll(map.keySet());
                } catch (Exception e) {
                    throw new HazelcastException(e);
                }
            }
            Iterator<QueueItem> iter = getItemQueue().iterator();
            while (iter.hasNext()) {
                QueueItem item = iter.next();
View Full Code Here

                try {
                    value.writeData(out);
                    // buffer size is exactly equal to binary size, no need to copy array.
                    actualValue = out.getBuffer();
                } catch (IOException e) {
                    throw new HazelcastException(e);
                } finally {
                    IOUtil.closeResource(out);
                }
            } else {
                actualValue = serializationService.toObject(value);
View Full Code Here

                        entry.getValue().writeData(out);
                        objectMap.put(entry.getKey(), out.toByteArray());
                        out.clear();
                    }
                } catch (IOException e) {
                    throw new HazelcastException(e);
                } finally {
                    IOUtil.closeResource(out);
                }
            } else {
                for (Map.Entry<Long, Data> entry : map.entrySet()) {
View Full Code Here

                ObjectDataInput in = serializationService.createObjectDataInput(dataBuffer);
                Data data = new Data();
                try {
                    data.readData(in);
                } catch (IOException e) {
                    throw new HazelcastException(e);
                }
                return data;
            }
            return serializationService.toData(val);
        }
View Full Code Here

                    ObjectDataInput in = serializationService.createObjectDataInput(dataBuffer);
                    Data data = new Data();
                    try {
                        data.readData(in);
                    } catch (IOException e) {
                        throw new HazelcastException(e);
                    }
                    dataMap.put(entry.getKey(), data);
                }
                return (Map<Long, Data>) map;
            } else {
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.