Package com.hazelcast.spi

Examples of com.hazelcast.spi.EventFilter


            public void entryEvicted(EntryEvent<Object, Object> event) {
                handleEvent(event);
            }
        };

        EventFilter eventFilter;
        if (getPredicate() == null) {
            eventFilter = new EntryEventFilter(includeValue, key);
        } else {
            eventFilter = new QueryEventFilter(includeValue, key, getPredicate());
        }
View Full Code Here


        final Set<EventRegistration> registrationsWithValue = new HashSet<EventRegistration>();
        final Set<EventRegistration> registrationsWithoutValue = new HashSet<EventRegistration>();
        // iterate on candidates.
        for (final EventRegistration candidate : candidates) {
            Result result = Result.NONE;
            final EventFilter filter = candidate.getFilter();
            if (emptyFilter(filter)) {
                result = processEmptyFilter();
            } else if (queryEventFilter(filter)) {
                result = processQueryEventFilter(filter, eventType, dataKey, dataOldValue, dataValue);
            } else if (filter.eval(dataKey)) {
                result = processEntryEventFilter(filter);
            }
            registerCandidate(result, candidate, registrationsWithValue, registrationsWithoutValue);
        }
        if (registrationsWithValue.isEmpty() && registrationsWithoutValue.isEmpty()) {
View Full Code Here

    public String addLocalEntryListenerInternal(EntryListener listener, Predicate predicate,
                                                final Data key, boolean includeValue) {

        final MapService mapService = getService();
        EventFilter eventFilter = new QueryEventFilter(includeValue, key, predicate);
        return mapService.getMapServiceContext().addLocalEventListener(listener, eventFilter, name);
    }
View Full Code Here

        return mapService.getMapServiceContext().addLocalEventListener(listener, eventFilter, name);
    }

    protected String addEntryListenerInternal(
            final EntryListener listener, final Data key, final boolean includeValue) {
        EventFilter eventFilter = new EntryEventFilter(includeValue, key);
        final MapService mapService = getService();
        return mapService.getMapServiceContext().addEventListener(listener, eventFilter, name);
    }
View Full Code Here

        return mapService.getMapServiceContext().addEventListener(listener, eventFilter, name);
    }

    protected String addEntryListenerInternal(
            EntryListener listener, Predicate predicate, final Data key, final boolean includeValue) {
        EventFilter eventFilter = new QueryEventFilter(includeValue, key, predicate);
        final MapService mapService = getService();
        return mapService.getMapServiceContext().addEventListener(listener, eventFilter, name);
    }
View Full Code Here

    }

    @Override
    public String addEntryListener(EntryListener listener, Object key) {
        ValidationUtil.isNotNull(listener, "listener");
        EventFilter eventFilter = new ReplicatedEntryEventFilter(marshallKey(key));
        mapStats.incrementOtherOperations();
        return replicatedMapService.addEventListener(listener, eventFilter, getName());
    }
View Full Code Here

    }

    @Override
    public String addEntryListener(EntryListener listener, Predicate predicate, Object key) {
        ValidationUtil.isNotNull(listener, "listener");
        EventFilter eventFilter = new ReplicatedQueryEventFilter(marshallKey(key), predicate);
        mapStats.incrementOtherOperations();
        return replicatedMapService.addEventListener(listener, eventFilter, getName());
    }
View Full Code Here

                    endpoint.sendEvent(portableEntryEvent, getCallId());
                }
            }
        };

        EventFilter eventFilter;
        if (getPredicate() == null) {
            eventFilter = new EntryEventFilter(includeValue, key);
        } else {
            eventFilter = new QueryEventFilter(includeValue, key, getPredicate());
        }
View Full Code Here

    }

    @Override
    public String addEntryListener(EntryListener listener, Object key) {
        ValidationUtil.isNotNull(listener, "listener");
        EventFilter eventFilter = new ReplicatedEntryEventFilter(marshallKey(key));
        mapStats.incrementOtherOperations();
        return replicatedMapService.addEventListener(listener, eventFilter, getName());
    }
View Full Code Here

    }

    @Override
    public String addEntryListener(EntryListener listener, Predicate predicate, Object key) {
        ValidationUtil.isNotNull(listener, "listener");
        EventFilter eventFilter = new ReplicatedQueryEventFilter(marshallKey(key), predicate);
        mapStats.incrementOtherOperations();
        return replicatedMapService.addEventListener(listener, eventFilter, getName());
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.spi.EventFilter

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.