| 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.config.properties.PropertyTypeConverter; | |
| 20 | import com.hazelcast.config.properties.SimplePropertyDefinition; | |
| 21 | import com.hazelcast.config.properties.ValueValidator; | |
| 22 | ||
| 23 | import static com.hazelcast.config.properties.PropertyTypeConverter.STRING; | |
| 24 | ||
| 25 | /** | |
| 26 | * The type Zookeeper discovery properties. | |
| 27 | */ | |
| 28 | public final class ZookeeperDiscoveryProperties { | |
| 29 | ||
| 30 | /** | |
| 31 | * Connection string to your ZooKeeper server. | |
| 32 | * Default: There is no default, this is a required property. | |
| 33 | * Example: 127.0.0.1:2181 | |
| 34 | * | |
| 35 | */ | |
| 36 | public static final PropertyDefinition ZOOKEEPER_URL = property("zookeeper_url", STRING); | |
| 37 | ||
| 38 | /** | |
| 39 | * Path in ZooKeeper Hazelcast will use | |
| 40 | * Default: /discovery/hazelcast | |
| 41 | * | |
| 42 | */ | |
| 43 | public static final PropertyDefinition ZOOKEEPER_PATH = property("zookeeper_path", STRING); | |
| 44 | ||
| 45 | /** | |
| 46 | * Name of this Hazelcast cluster. You can have multiple distinct clusters to use the | |
| 47 | * same ZooKeeper installation. | |
| 48 | * | |
| 49 | */ | |
| 50 | public static final PropertyDefinition GROUP = property("group", STRING); | |
| 51 | ||
| 52 | private ZookeeperDiscoveryProperties() { | |
| 53 | } | |
| 54 | ||
| 55 | private static PropertyDefinition property(String key, PropertyTypeConverter typeConverter) { | |
| 56 | return property(key, typeConverter, null); | |
| 57 | } | |
| 58 | ||
| 59 | private static PropertyDefinition property(String key, PropertyTypeConverter typeConverter, | |
| 60 | ValueValidator valueValidator) { | |
| 61 |
1
1. property : replaced return value with null for com/hazelcast/zookeeper/ZookeeperDiscoveryProperties::property → KILLED |
return new SimplePropertyDefinition(key, true, typeConverter, valueValidator); |
| 62 | } | |
| 63 | } | |
Mutations | ||
| 61 |
1.1 |