Package com.hazelcast.replicatedmap.impl

Examples of com.hazelcast.replicatedmap.impl.PreReplicationHook


            distributeReplicationMessage(message, false);
        }
    }

    void distributeReplicationMessage(final Object message, final boolean forceSend) {
        final PreReplicationHook preReplicationHook = getPreReplicationHook();
        if (forceSend || preReplicationHook == null) {
            Collection<EventRegistration> eventRegistrations = eventService.getRegistrations(SERVICE_NAME, EVENT_TOPIC_NAME);
            Collection<EventRegistration> registrations = filterEventRegistrations(eventRegistrations);
            eventService.publishEvent(ReplicatedMapService.SERVICE_NAME, registrations, message, name.hashCode());
        } else {
            executionService.execute(EXECUTOR_NAME, new Runnable() {
                @Override
                public void run() {
                    if (message instanceof MultiReplicationMessage) {
                        preReplicationHook.preReplicateMultiMessage((MultiReplicationMessage) message, ReplicationPublisher.this);
                    } else {
                        preReplicationHook.preReplicateMessage((ReplicationMessage) message, ReplicationPublisher.this);
                    }
                }
            });
        }
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.replicatedmap.impl.PreReplicationHook

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.