Skip to content

Commit

Permalink
Remove ICache wan operation provider.
Browse files Browse the repository at this point in the history
It was used to check wan queues on caller side but it is wrong place
to check queues with this commit the check is moved to callee side.
  • Loading branch information
ahmetmircik committed Aug 2, 2019
1 parent 528717c commit 4ec21b9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ public CacheWanEventPublisher getCacheWanEventPublisher() {
throw new UnsupportedOperationException("WAN replication is not supported");
}

@Override
public void checkWanReplicationQueues(String cacheName) {
// NOP intentionally
}

public static ObjectNamespace getObjectNamespace(String cacheName) {
return new DistributedObjectNamespace(SERVICE_NAME, cacheName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
import com.hazelcast.nio.serialization.Data;
import com.hazelcast.spi.EventFilter;
import com.hazelcast.spi.EventPublishingService;
import com.hazelcast.spi.partition.FragmentedMigrationAwareService;
import com.hazelcast.spi.ManagedService;
import com.hazelcast.spi.NodeEngine;
import com.hazelcast.spi.RemoteService;
import com.hazelcast.spi.partition.FragmentedMigrationAwareService;

import java.util.Collection;

Expand Down Expand Up @@ -135,6 +135,13 @@ public interface ICacheService
*/
CacheWanEventPublisher getCacheWanEventPublisher();


/**
* @param cacheNameWithPrefix the full name of the {@link
* com.hazelcast.cache.ICache}, including the manager scope prefix
*/
void checkWanReplicationQueues(String cacheNameWithPrefix);

/**
* Returns an interface for interacting with the cache event journals.
*/
Expand All @@ -145,9 +152,9 @@ public interface ICacheService
* cluster version 3.10 or greater, the cluster-wide invocation ensures that all members of
* the cluster will receive the cache config even in the face of cluster membership changes.
*
* @param cacheConfig the cache config to create on all members of the cluster
* @param <K> key type parameter
* @param <V> value type parameter
* @param cacheConfig the cache config to create on all members of the cluster
* @param <K> key type parameter
* @param <V> value type parameter
* @since 3.10
*/
<K, V> void createCacheConfigOnAllMembers(PreJoinCacheConfig<K, V> cacheConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public final void beforeRun() throws Exception {

if (recordStore != null && recordStore.isWanReplicationEnabled()) {
wanEventPublisher = cacheService.getCacheWanEventPublisher();
cacheService.checkWanReplicationQueues(name);
}

beforeRunInternal();
Expand Down

0 comments on commit 4ec21b9

Please sign in to comment.