| 1 | /* | |
| 2 | * Copyright 2020 Hazelcast Inc. | |
| 3 | * | |
| 4 | * Licensed under the Hazelcast Community License (the "License"); you may not use | |
| 5 | * this file except in compliance with the License. You may obtain a copy of the | |
| 6 | * License at | |
| 7 | * | |
| 8 | * http://hazelcast.com/hazelcast-community-license | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
| 12 | * WARRANTIES OF ANY KIND, either express or implied. See the License for the | |
| 13 | * specific language governing permissions and limitations under the License. | |
| 14 | */ | |
| 15 | ||
| 16 | package com.hazelcast.zookeeper; | |
| 17 | ||
| 18 | import com.hazelcast.config.properties.PropertyDefinition; | |
| 19 | import com.hazelcast.logging.ILogger; | |
| 20 | import com.hazelcast.spi.discovery.DiscoveryNode; | |
| 21 | import com.hazelcast.spi.discovery.DiscoveryStrategy; | |
| 22 | import com.hazelcast.spi.discovery.DiscoveryStrategyFactory; | |
| 23 | ||
| 24 | import java.util.ArrayList; | |
| 25 | import java.util.Collection; | |
| 26 | import java.util.Collections; | |
| 27 | import java.util.List; | |
| 28 | import java.util.Map; | |
| 29 | ||
| 30 | /** | |
| 31 | * Factory class for ZookeeperDiscoveryStrategy | |
| 32 | */ | |
| 33 | public class ZookeeperDiscoveryStrategyFactory implements DiscoveryStrategyFactory { | |
| 34 | ||
| 35 | private static final Collection<PropertyDefinition> PROPERTY_DEFINITIONS; | |
| 36 | ||
| 37 | static { | |
| 38 | List<PropertyDefinition> propertyDefinitions = new ArrayList<>(); | |
| 39 | propertyDefinitions.add(ZookeeperDiscoveryProperties.ZOOKEEPER_URL); | |
| 40 | propertyDefinitions.add(ZookeeperDiscoveryProperties.ZOOKEEPER_PATH); | |
| 41 | propertyDefinitions.add(ZookeeperDiscoveryProperties.GROUP); | |
| 42 | PROPERTY_DEFINITIONS = Collections.unmodifiableCollection(propertyDefinitions); | |
| 43 | } | |
| 44 | ||
| 45 | public Class<? extends DiscoveryStrategy> getDiscoveryStrategyType() { | |
| 46 |
1
1. getDiscoveryStrategyType : replaced return value with null for com/hazelcast/zookeeper/ZookeeperDiscoveryStrategyFactory::getDiscoveryStrategyType → KILLED |
return ZookeeperDiscoveryStrategy.class; |
| 47 | } | |
| 48 | ||
| 49 | public DiscoveryStrategy newDiscoveryStrategy(DiscoveryNode discoveryNode, ILogger logger, | |
| 50 | Map<String, Comparable> properties) { | |
| 51 |
1
1. newDiscoveryStrategy : replaced return value with null for com/hazelcast/zookeeper/ZookeeperDiscoveryStrategyFactory::newDiscoveryStrategy → KILLED |
return new ZookeeperDiscoveryStrategy(discoveryNode, logger, properties); |
| 52 | } | |
| 53 | ||
| 54 | public Collection<PropertyDefinition> getConfigurationProperties() { | |
| 55 |
1
1. getConfigurationProperties : replaced return value with Collections.emptyList for com/hazelcast/zookeeper/ZookeeperDiscoveryStrategyFactory::getConfigurationProperties → KILLED |
return PROPERTY_DEFINITIONS; |
| 56 | } | |
| 57 | } | |
Mutations | ||
| 46 |
1.1 |
|
| 51 |
1.1 |
|
| 55 |
1.1 |