Package co.paralleluniverse.galaxy

Examples of co.paralleluniverse.galaxy.CacheListener


        return null;
    }

    private CacheListener handleOpListen(CacheLine line, Object data, Object listener) {
        final boolean ifAbsent = (boolean) (data != null ? data : false);
        final CacheListener lst = line.setListener((CacheListener) listener, ifAbsent);

        // send pending MSG messages to listener
        if (lst != null && lst == listener) {
            for (Message.MSG msg : getAndClearPendingMSGs(line))
                handleMessageMsg(msg, line);
View Full Code Here


    }

    public R getOrCreateRef(long id) {
        if (id <= 0)
            return null;
        CacheListener ref = cache.getListener(id);
        return (R) (ref != null ? ref : cache.setListenerIfAbsent(id, createRef(id, null)));
    }
View Full Code Here

    }

    public static <T> DistributedReference<T> getOrCreateRef(Cache cache, long id) {
        if (id <= 0)
            return null;
        CacheListener ref = cache.getListener(id);
        return (DistributedReference<T>) (ref != null ? ref : cache.setListenerIfAbsent(id, new DistributedReference<T>(id, null)));
    }
View Full Code Here

        try {
            boolean error = false;
            try {
                final long root = store.getRoot(rootName, txn);
                byte[] buf = store.get(root);
                store.setListener(root, new CacheListener() {
                    @Override
                    public void invalidated(long id) {
                        evicted(id);
                    }
View Full Code Here

                    actor = (ActorRef<Message>) ser.read(buf);
                } catch (Exception e) {
                    LOG.info("Deserializing actor at root " + rootName + " has failed with exception", e);
                    return null;
                }
                store.setListener(root, new CacheListener() {
                    @Override
                    public void invalidated(long id) {
                        evicted(id);
                    }
View Full Code Here

TOP

Related Classes of co.paralleluniverse.galaxy.CacheListener

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.