package org.openspaces.admin.internal.pu.elastic;

import java.util.Map;

/**
 * @author Moran Avigdor
 * @since 8.0.1
 */
public class ElasticMachineIsolationConfig {
    
    private static final String ELASTIC_MACHINE_ISOLATION_SHARING_ID_KEY = "elastic-machine-provisioning-isolation-sharing-id";
    private final Map<String, String> properties;

    public ElasticMachineIsolationConfig(Map<String, String> properties) {
        this.properties = properties;
    }
    
    public boolean isDedicatedIsolation() {
        return (getSharingId() == null);
    }
    
    public boolean isSharedIsolation() {
        return (getSharingId() != null);
    }
    
    public String getSharingId() {
        return properties.get(ELASTIC_MACHINE_ISOLATION_SHARING_ID_KEY);
    }

    public void setSharingId(String sharingId) {
        properties.put(ELASTIC_MACHINE_ISOLATION_SHARING_ID_KEY, sharingId);
    }
}

package org.openspaces.admin.internal.pu.elastic;

import java.util.Map;

/**
 * @author Moran Avigdor
 * @since 8.0.1
 */
public class ElasticMachineIsolationConfig {
    
    private static final String ELASTIC_MACHINE_ISOLATION_SHARING_ID_KEY = "elastic-machine-isolation-sharing-id";
    private final Map<String, String> properties;

    public ElasticMachineIsolationConfig(Map<String, String> properties) {
        this.properties = properties;
    }
    
    public boolean isDedicatedIsolation() {
        return (getSharingId() == null);
    }
    
    public boolean isSharedIsolation() {
        return (getSharingId() != null);
    }
    
    public String getSharingId() {
        return properties.get(ELASTIC_MACHINE_ISOLATION_SHARING_ID_KEY);
    }

    public void setSharingId(String sharingId) {
        properties.put(ELASTIC_MACHINE_ISOLATION_SHARING_ID_KEY, sharingId);
    }
}

Add machine isolation API shorter key
GS-8654: Add machine isolation API
shorter key

svn path=/trunk/openspaces/; revision=83620


Former-commit-id: 2bab1678ffd82133a8e8506c17b9d505eb44706b