@Override public boolean include(Profile profile) { assert profile instanceof CacheProfile; CacheProfile cp = (CacheProfile) profile; if (cp.dataPolicy.isNormal()) { return true; } return false; } });
@Override public MirrorType getMirrorType() { if (this.dataPolicy.isNormal() || this.dataPolicy.isPreloaded() || this.dataPolicy.isEmpty() || this.dataPolicy.withPartitioning()) { return MirrorType.NONE; } else if (this.dataPolicy.withReplication()) { return MirrorType.KEYS_VALUES; } else { throw new IllegalStateException( String.format("No mirror type corresponds to data policy %s", this.dataPolicy)); } }
@Override public MirrorType getMirrorType() { // checkReadiness(); if (this.dataPolicy.isNormal() || this.dataPolicy.isPreloaded() || this.dataPolicy.isEmpty() || this.dataPolicy.withPartitioning()) { return MirrorType.NONE; } else if (this.dataPolicy.withReplication()) { return MirrorType.KEYS_VALUES; } else { throw new IllegalStateException( String.format("No mirror type corresponds to data policy %s", this.dataPolicy)); } }
@Override @SuppressWarnings("deprecation") public MirrorType getMirrorType() { if (this.dataPolicy.isNormal() || this.dataPolicy.isPreloaded() || this.dataPolicy.isEmpty() || this.dataPolicy.withPartitioning()) { return MirrorType.NONE; } else if (this.dataPolicy.withReplication()) { return MirrorType.KEYS_VALUES; } else { throw new IllegalStateException( String.format("No mirror type corresponds to data policy %s.", this.dataPolicy)); } }
if (dp.isEmpty() || dp.isNormal()) {
@Override public MirrorType getMirrorType() { if (this.getDataPolicy().isNormal() || this.getDataPolicy().isPreloaded() || this.getDataPolicy().isEmpty() || this.getDataPolicy().withPartitioning()) { return MirrorType.NONE; } else if (this.getDataPolicy().withReplication()) { return MirrorType.KEYS_VALUES; } else { throw new IllegalStateException( String.format("No mirror type corresponds to data policy %s", this.getDataPolicy())); } }
@Override public ResultCollector execute(final String functionName) { if (functionName == null) { throw new FunctionException( "The input function for the execute function request is null"); } this.isFnSerializationReqd = false; Function functionObject = FunctionService.getFunction(functionName); if (functionObject == null) { throw new FunctionException( String.format("Function named %s is not registered to FunctionService", functionName)); } if (region.getAttributes().getDataPolicy().isNormal()) { throw new FunctionException( "Function execution on region with DataPolicy.NORMAL is not supported"); } return executeFunction(functionObject); }
@Override public ResultCollector execute(final Function function) { if (function == null) { throw new FunctionException( String.format("The input %s for the execute function request is null", "function instance")); } if (function.isHA() && !function.hasResult()) { throw new FunctionException( "For Functions with isHA true, hasResult must also be true."); } if (region.getAttributes().getDataPolicy().isNormal()) { throw new FunctionException( "Function execution on region with DataPolicy.NORMAL is not supported"); } String id = function.getId(); if (id == null) { throw new FunctionException( "The Function#getID() returned null"); } this.isFnSerializationReqd = true; return executeFunction(function); }
if (dp.isEmpty()) { dpString = EMPTY_DP; } else if (dp.isNormal()) { dpString = NORMAL_DP; } else if (dp.isPreloaded()) {