- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.helix.ZNRecord.setBooleanField()
方法的一些代码示例,展示了ZNRecord.setBooleanField()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZNRecord.setBooleanField()
方法的具体详情如下:
包路径:org.apache.helix.ZNRecord
类名称:ZNRecord
方法名:setBooleanField
[英]Set a single simple boolean field
[中]设置一个简单的布尔字段
代码示例来源:origin: apache/incubator-pinot
public static void setClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore,
boolean isSingleTenantCluster) {
final ZNRecord znRecord;
final String path = constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
if (!propertyStore.exists(path, AccessOption.PERSISTENT)) {
znRecord = new ZNRecord(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
} else {
znRecord = propertyStore.get(path, null, AccessOption.PERSISTENT);
}
znRecord.setBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, isSingleTenantCluster);
propertyStore.set(path, znRecord, AccessOption.PERSISTENT);
}
代码示例来源:origin: apache/incubator-pinot
updatedIdealState.getRecord().setBooleanField("enableCompression", true);
代码示例来源:origin: apache/incubator-pinot
nextIdealState.getRecord().setBooleanField("enableCompression", true);
代码示例来源:origin: apache/incubator-pinot
instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, true);
_helixAdmin.setInstanceConfig(_clusterName, instance, instanceConfig);
instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, false);
_helixAdmin.setInstanceConfig(_clusterName, instance, instanceConfig);
instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, true);
_helixAdmin.setInstanceConfig(_clusterName, instanceName, instanceConfig);
instanceConfig.getRecord().setBooleanField(CommonConstants.Helix.IS_SHUTDOWN_IN_PROGRESS, false);
_helixAdmin.setInstanceConfig(_clusterName, instanceName, instanceConfig);
代码示例来源:origin: org.apache.helix/helix-core
/**
* Enable/Disable the delayed rebalance.
* By default it is enabled if not set.
*
* @param enabled
*/
public void setDelayRebalanceEnabled(boolean enabled) {
_record.setBooleanField(ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled);
}
代码示例来源:origin: org.apache.helix/helix-core
/**
* Disable/enable delay rebalance.
* By default, this is ENABLED if not set.
*
* @param enabled
*/
public void setDelayRebalaceEnabled(boolean enabled) {
_record.setBooleanField(ClusterConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled);
}
代码示例来源:origin: org.apache.helix/helix-core
/**
* Enable/Disable the delayed rebalance. By default it is enabled if not set.
*
* @param enabled
*/
public void setDelayRebalanceEnabled(boolean enabled) {
_record.setBooleanField(ResourceConfig.ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(),
enabled);
}
代码示例来源:origin: org.apache.helix/helix-core
/**
* Enable/disable topology aware rebalacning. If enabled, both {@link #setTopology(String)} and
* {@link #setFaultZoneType(String)} should be set.
* By default, this is DISABLED if not set.
*
* @param enabled
*/
public void setTopologyAwareEnabled(boolean enabled) {
_record.setBooleanField(ClusterConfigProperty.TOPOLOGY_AWARE_ENABLED.name(), enabled);
}
代码示例来源:origin: org.apache.helix/helix-core
/**
* Enable/disable target externalview persist
* @param enabled
*/
public void enableTargetExternalView(boolean enabled) {
_record.setBooleanField(ClusterConfigProperty.TARGET_EXTERNALVIEW_ENABLED.name(), enabled);
}
代码示例来源:origin: apache/helix
/**
* Enable/disable topology aware rebalacning. If enabled, both {@link #setTopology(String)} and
* {@link #setFaultZoneType(String)} should be set.
* By default, this is DISABLED if not set.
*
* @param enabled
*/
public void setTopologyAwareEnabled(boolean enabled) {
_record.setBooleanField(ClusterConfigProperty.TOPOLOGY_AWARE_ENABLED.name(), enabled);
}
代码示例来源:origin: apache/helix
/**
* Disable/enable delay rebalance.
* By default, this is ENABLED if not set.
*
* @param enabled
*/
public void setDelayRebalaceEnabled(boolean enabled) {
_record.setBooleanField(ClusterConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled);
}
代码示例来源:origin: apache/helix
/**
* Enable/Disable the delayed rebalance.
* By default it is enabled if not set.
*
* @param enabled
*/
public void setDelayRebalanceEnabled(boolean enabled) {
_record.setBooleanField(ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(), enabled);
}
代码示例来源:origin: apache/helix
/**
* Enable/disable target externalview persist
* @param enabled
*/
public void enableTargetExternalView(boolean enabled) {
_record.setBooleanField(ClusterConfigProperty.TARGET_EXTERNALVIEW_ENABLED.name(), enabled);
}
代码示例来源:origin: apache/helix
/**
* Enable P2P state transition message for all resources in this cluster. P2P State Transition
* message can reduce the top-state replica unavailable time during top-state handoff period. This
* only applies for those resources with state models that only have a single top-state replica,
* such as MasterSlave or LeaderStandy models. By default P2P message is disabled if not set.
*
* @param enabled
*/
public void enableP2PMessage(boolean enabled) {
_record.setBooleanField(HelixConfigProperty.P2P_MESSAGE_ENABLED.name(), enabled);
}
代码示例来源:origin: org.apache.helix/helix-core
/**
* Enable P2P state transition message for all resources in this cluster. P2P State Transition
* message can reduce the top-state replica unavailable time during top-state handoff period. This
* only applies for those resources with state models that only have a single top-state replica,
* such as MasterSlave or LeaderStandy models. By default P2P message is disabled if not set.
*
* @param enabled
*/
public void enableP2PMessage(boolean enabled) {
_record.setBooleanField(HelixConfigProperty.P2P_MESSAGE_ENABLED.name(), enabled);
}
代码示例来源:origin: apache/helix
/**
* Enable/Disable the delayed rebalance. By default it is enabled if not set.
*
* @param enabled
*/
public void setDelayRebalanceEnabled(boolean enabled) {
_record.setBooleanField(ResourceConfig.ResourceConfigProperty.DELAY_REBALANCE_ENABLED.name(),
enabled);
}
代码示例来源:origin: apache/helix
/**
* Set the enabled state of the instance
*
* @param enabled true to enable, false to disable
*/
public void setInstanceEnabled(boolean enabled) {
_record.setBooleanField(InstanceConfigProperty.HELIX_ENABLED.toString(), enabled);
_record.setLongField(InstanceConfigProperty.HELIX_ENABLED_TIMESTAMP.name(),
System.currentTimeMillis());
}
代码示例来源:origin: org.apache.helix/helix-core
/**
* Set the enabled state of the instance
*
* @param enabled true to enable, false to disable
*/
public void setInstanceEnabled(boolean enabled) {
_record.setBooleanField(InstanceConfigProperty.HELIX_ENABLED.toString(), enabled);
_record.setLongField(InstanceConfigProperty.HELIX_ENABLED_TIMESTAMP.name(),
System.currentTimeMillis());
}
代码示例来源:origin: apache/helix
/**
* Enable/Disable state transition cancellation for the cluster
* @param enable
*/
public void stateTransitionCancelEnabled(Boolean enable) {
if (enable == null) {
_record.getSimpleFields()
.remove(ClusterConfigProperty.STATE_TRANSITION_CANCELLATION_ENABLED.name());
} else {
_record.setBooleanField(ClusterConfigProperty.STATE_TRANSITION_CANCELLATION_ENABLED.name(),
enable);
}
}
代码示例来源:origin: apache/helix
/**
* Enable/Disable persist best possible assignment in a resource's idealstate.
* CAUTION: if both {@link #setPersistBestPossibleAssignment(Boolean)} and {@link #setPersistIntermediateAssignment(Boolean)}
* are set to true, the IntermediateAssignment will be persisted into IdealState's map field.
* By default, it is DISABLED if not set.
* @return
*/
public void setPersistBestPossibleAssignment(Boolean enable) {
if (enable == null) {
_record.getSimpleFields().remove(ClusterConfigProperty.PERSIST_BEST_POSSIBLE_ASSIGNMENT.toString());
} else {
_record.setBooleanField(ClusterConfigProperty.PERSIST_BEST_POSSIBLE_ASSIGNMENT.toString(), enable);
}
}
本文整理了Java中org.apache.helix.ZNRecord.setBooleanField()方法的一些代码示例,展示了ZNRecord.setBooleanField()的具体用法。这些
我是一名优秀的程序员,十分优秀!