Package com.netflix.config

Examples of com.netflix.config.DynamicBooleanProperty


    @Override
    public boolean getIsSecure() {
        // get value from netflixConfiguration as it can be overridden for debugging / testing applications
        String propName = "com.netflix.explorers." + name + "." + "secure";
        try {
            final DynamicBooleanProperty isSecureDynamicProperty = DynamicPropertyFactory.getInstance().getBooleanProperty(propName, isSecure);
            isSecure = isSecureDynamicProperty.get();
            return isSecure;
        } catch (Exception ex) {
            return isSecure;
        }
    }
View Full Code Here


    return property.get();
  }

  @Override
  public boolean getBoolean(String key, boolean defaultValue) {
    final DynamicBooleanProperty property = DynamicPropertyFactory
        .getInstance().getBooleanProperty(key, defaultValue);
    return property.get();
  }
View Full Code Here

    private void setupNewClientsByZone(String zone, List<ZoneClusteredEVCacheClientImpl> newClients) {
        final List<ZoneClusteredEVCacheClientImpl> currentClients = memcachedInstancesByZone.put(zone, newClients);

        //if the zone is in write only mode then remove it from the Map
        final DynamicBooleanProperty isZoneInWriteOnlyMode = writeOnlyFastPropertyMap.get(zone);
        if (isZoneInWriteOnlyMode.get()) {
            memcachedReadInstancesByZone.remove(zone);
        } else {
            memcachedReadInstancesByZone.put(zone, newClients);
        }
        memcachedWriteInstancesByZone.put(zone, newClients);
View Full Code Here

    // Check if a zone has been moved to Write only. If so, remove the zone from the read map.
    // Similarly if the zone has been moved to Read+Write from write only add it back to the read map.
    private void updateMemcachedReadInstancesByZone() {
        for (String zone : memcachedInstancesByZone.keySet()) {
            final DynamicBooleanProperty isZoneInWriteOnlyMode = writeOnlyFastPropertyMap.get(zone);
            if (isZoneInWriteOnlyMode.get()) {
                if (memcachedReadInstancesByZone.containsKey(zone)) {
                    //TODO stats
                    memcachedReadInstancesByZone.remove(zone);
                }
            } else {
View Full Code Here

    private void setupNewClientsByZone(String zone, List<EVCacheClientImpl> newClients) {
        final List<EVCacheClientImpl> currentClients = memcachedInstancesByZone.put(zone, newClients);

        //if the zone is in write only mode then remove it from the Map
        final DynamicBooleanProperty isZoneInWriteOnlyMode = writeOnlyFastPropertyMap.get(zone);
        if (isZoneInWriteOnlyMode.get()) {
            memcachedReadInstancesByZone.remove(zone);
        } else {
            memcachedReadInstancesByZone.put(zone, newClients);
        }
        memcachedWriteInstancesByZone.put(zone, newClients);
View Full Code Here

    // Check if a zone has been moved to Write only. If so, remove the zone from the read map.
    // Similarly if the zone has been moved to Read+Write from write only add it back to the read map.
    private void updateMemcachedReadInstancesByZone() {
        for (String zone : memcachedInstancesByZone.keySet()) {
            final DynamicBooleanProperty isZoneInWriteOnlyMode = writeOnlyFastPropertyMap.get(zone);
            if (isZoneInWriteOnlyMode.get()) {
                if (memcachedReadInstancesByZone.containsKey(zone)) {
                    //TODO add stats
                    memcachedReadInstancesByZone.remove(zone);
                }
            } else {
View Full Code Here

TOP

Related Classes of com.netflix.config.DynamicBooleanProperty

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.