geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject [4/5] geode git commit: GEODE-265 : Removing implementation of methods which are deprecated and are removed from Execution interface.
Date Mon, 05 Jun 2017 18:22:32 GMT
GEODE-265 : Removing implementation of methods which are deprecated and are removed from Execution
interface.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/32be4c29
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/32be4c29
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/32be4c29

Branch: refs/heads/develop
Commit: 32be4c298c04efebdf8eba18a21f6710666ef293
Parents: fe2f18d
Author: Deepak Dixit <deepakdixit2011@gmail.com>
Authored: Wed May 10 18:14:24 2017 +0530
Committer: nabarun <nnag@pivotal.io>
Committed: Mon Jun 5 11:14:16 2017 -0700

----------------------------------------------------------------------
 .../cache/execute/AbstractExecution.java        |  91 ---------------
 .../DistributedRegionFunctionExecutor.java      | 110 -------------------
 .../cache/execute/MemberFunctionExecutor.java   |   5 -
 .../execute/MultiRegionFunctionExecutor.java    |   4 -
 .../PartitionedRegionFunctionExecutor.java      |   4 -
 .../cache/execute/ServerFunctionExecutor.java   |  85 --------------
 .../execute/ServerRegionFunctionExecutor.java   |  89 ---------------
 7 files changed, 388 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/32be4c29/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
index 64b2284..399d91f 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
@@ -471,97 +471,6 @@ public abstract class AbstractExecution implements InternalExecution
{
     idToFunctionAttributes.put(functionId, functionAttributes);
   }
 
-  public ResultCollector execute(String functionName, boolean hasResult) throws FunctionException
{
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_FUNCTION_NAMED_0_IS_NOT_REGISTERED
-              .toLocalizedString(functionObject));
-    }
-
-    byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-        functionObject.hasResult(), functionObject.optimizeForWrite());
-
-    byte functionState = AbstractExecution.getFunctionState(hasResult, hasResult, false);
-    if (registeredFunctionState != functionState) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-              .toLocalizedString(functionName));
-    }
-
-    this.isFnSerializationReqd = false;
-    // If hasResult is true, isHA will also be true and hasResult is false then isHA will
be false
-    // For other combination use next API
-    return executeFunction(functionObject);
-  }
-
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA)
-      throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_FUNCTION_NAMED_0_IS_NOT_REGISTERED
-              .toLocalizedString(functionObject));
-    }
-    byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-        functionObject.hasResult(), functionObject.optimizeForWrite());
-
-    byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, false);
-    if (registeredFunctionState != functionState) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-              .toLocalizedString(functionName));
-    }
-
-    this.isFnSerializationReqd = false;
-    return executeFunction(functionObject);
-  }
-
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA,
-      boolean isOptimizeForWrite) throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_FUNCTION_NAMED_0_IS_NOT_REGISTERED
-              .toLocalizedString(functionObject));
-    }
-    byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-        functionObject.hasResult(), functionObject.optimizeForWrite());
-
-    byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, isOptimizeForWrite);
-    if (registeredFunctionState != functionState) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-              .toLocalizedString(functionName));
-    }
-
-    this.isFnSerializationReqd = false;
-    return executeFunction(functionObject);
-  }
-
   private void handleException(Throwable functionException, final Function fn,
       final FunctionContext cx, final ResultSender sender, DM dm) {
     FunctionStats stats = FunctionStats.getFunctionStats(fn.getId(), dm.getSystem());

http://git-wip-us.apache.org/repos/asf/geode/blob/32be4c29/geode-core/src/main/java/org/apache/geode/internal/cache/execute/DistributedRegionFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/DistributedRegionFunctionExecutor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/DistributedRegionFunctionExecutor.java
index fe7b3d3..f065700 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/DistributedRegionFunctionExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/DistributedRegionFunctionExecutor.java
@@ -169,112 +169,6 @@ public class DistributedRegionFunctionExecutor extends AbstractExecution
{
     return executeFunction(functionObject);
   }
 
-  public ResultCollector execute(String functionName, boolean hasResult) throws FunctionException
{
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_FUNCTION_NAMED_0_IS_NOT_REGISTERED
-              .toLocalizedString(functionObject));
-    }
-    if (region.getAttributes().getDataPolicy().isNormal()) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteRegionFunction_CAN_NOT_EXECUTE_ON_NORMAL_REGION
-              .toLocalizedString());
-    }
-    byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-        functionObject.hasResult(), functionObject.optimizeForWrite());
-
-    byte functionState = AbstractExecution.getFunctionState(hasResult, hasResult, false);
-    if (registeredFunctionState != functionState) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-              .toLocalizedString(functionName));
-    }
-
-    this.isFnSerializationReqd = false;
-    // If hasResult is true, isHA will also be true and hasResult is false then
-    // isHA will be false
-    // For other combination use next API
-    return executeFunction(functionObject);
-  }
-
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA)
-      throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_FUNCTION_NAMED_0_IS_NOT_REGISTERED
-              .toLocalizedString(functionObject));
-    }
-    if (region.getAttributes().getDataPolicy().isNormal()) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteRegionFunction_CAN_NOT_EXECUTE_ON_NORMAL_REGION
-              .toLocalizedString());
-    }
-    byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-        functionObject.hasResult(), functionObject.optimizeForWrite());
-
-    byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, false);
-    if (registeredFunctionState != functionState) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-              .toLocalizedString(functionName));
-    }
-
-    this.isFnSerializationReqd = false;
-    return executeFunction(functionObject);
-  }
-
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA,
-      boolean isOptimizeForWrite) throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_FUNCTION_NAMED_0_IS_NOT_REGISTERED
-              .toLocalizedString(functionObject));
-    }
-    if (region.getAttributes().getDataPolicy().isNormal()) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteRegionFunction_CAN_NOT_EXECUTE_ON_NORMAL_REGION
-              .toLocalizedString());
-    }
-    byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-        functionObject.hasResult(), functionObject.optimizeForWrite());
-
-    byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, isOptimizeForWrite);
-    if (registeredFunctionState != functionState) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-              .toLocalizedString(functionName));
-    }
-
-    this.isFnSerializationReqd = false;
-    return executeFunction(functionObject);
-  }
-
   @Override
   public ResultCollector execute(final Function function) {
     if (function == null) {
@@ -356,10 +250,6 @@ public class DistributedRegionFunctionExecutor extends AbstractExecution
{
     return new DistributedRegionFunctionExecutor(this, args);
   }
 
-  public Execution withArgs(Object args) {
-    return setArguments(args);
-  }
-
   public Execution withCollector(ResultCollector rs) {
     if (rs == null) {
       throw new IllegalArgumentException(

http://git-wip-us.apache.org/repos/asf/geode/blob/32be4c29/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutor.java
index ab6794b..0961bd0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutor.java
@@ -213,11 +213,6 @@ public class MemberFunctionExecutor extends AbstractExecution {
   }
 
   // Changing the object!!
-  public Execution withArgs(Object args) {
-    return setArguments(args);
-  }
-
-  // Changing the object!!
   public Execution withCollector(ResultCollector rs) {
     if (rs == null) {
       throw new IllegalArgumentException(

http://git-wip-us.apache.org/repos/asf/geode/blob/32be4c29/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MultiRegionFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MultiRegionFunctionExecutor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MultiRegionFunctionExecutor.java
index 27542f5..c27649a 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MultiRegionFunctionExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/MultiRegionFunctionExecutor.java
@@ -148,10 +148,6 @@ public class MultiRegionFunctionExecutor extends AbstractExecution {
     return new MultiRegionFunctionExecutor(this, args);
   }
 
-  public Execution withArgs(Object args) {
-    return setArguments(args);
-  }
-
   public Execution withCollector(ResultCollector rc) {
     if (rc == null) {
       throw new IllegalArgumentException(

http://git-wip-us.apache.org/repos/asf/geode/blob/32be4c29/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionExecutor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionExecutor.java
index 6e13ebc..c6d8b62 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/PartitionedRegionFunctionExecutor.java
@@ -282,10 +282,6 @@ public class PartitionedRegionFunctionExecutor extends AbstractExecution
{
     return new PartitionedRegionFunctionExecutor(this, args);
   }
 
-  public Execution withArgs(Object args) {
-    return setArguments(args);
-  }
-
   public Execution withCollector(ResultCollector rs) {
     if (rs == null) {
       throw new FunctionException(

http://git-wip-us.apache.org/repos/asf/geode/blob/32be4c29/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerFunctionExecutor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerFunctionExecutor.java
index d11358e..781f3b9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerFunctionExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerFunctionExecutor.java
@@ -260,10 +260,6 @@ public class ServerFunctionExecutor extends AbstractExecution {
     return new ServerFunctionExecutor(this, args);
   }
 
-  public Execution withArgs(Object args) {
-    return setArguments(args);
-  }
-
   public Execution withCollector(ResultCollector rs) {
     if (rs == null) {
       throw new FunctionException(
@@ -320,85 +316,4 @@ public class ServerFunctionExecutor extends AbstractExecution {
     }
   }
 
-  public ResultCollector execute(String functionName, boolean hasResult) throws FunctionException
{
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    this.isFnSerializationReqd = false;
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      return executeFunction(functionName, hasResult, hasResult, false);
-    } else {
-      byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-          functionObject.hasResult(), functionObject.optimizeForWrite());
-
-      byte functionState = AbstractExecution.getFunctionState(hasResult, hasResult, false);
-      if (registeredFunctionState != functionState) {
-        throw new FunctionException(
-            LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-                .toLocalizedString(functionName));
-      }
-      return executeFunction(functionObject);
-    }
-  }
-
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA)
-      throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    this.isFnSerializationReqd = false;
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      return executeFunction(functionName, hasResult, isHA, false);
-    } else {
-      byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-          functionObject.hasResult(), functionObject.optimizeForWrite());
-
-      byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, false);
-      if (registeredFunctionState != functionState) {
-        throw new FunctionException(
-            LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-                .toLocalizedString(functionName));
-      }
-      return executeFunction(functionObject);
-    }
-  }
-
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA,
-      boolean isOptimizeForWrite) throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    this.isFnSerializationReqd = false;
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      return executeFunction(functionName, hasResult, isHA, isOptimizeForWrite);
-    } else {
-      byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-          functionObject.hasResult(), functionObject.optimizeForWrite());
-
-      byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, isOptimizeForWrite);
-      if (registeredFunctionState != functionState) {
-        throw new FunctionException(
-            LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-                .toLocalizedString(functionName));
-      }
-      return executeFunction(functionObject);
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/32be4c29/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerRegionFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerRegionFunctionExecutor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerRegionFunctionExecutor.java
index 18ba32b..cb3eebc 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerRegionFunctionExecutor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/ServerRegionFunctionExecutor.java
@@ -317,10 +317,6 @@ public class ServerRegionFunctionExecutor extends AbstractExecution {
     return new ServerRegionFunctionExecutor(this, args);
   }
 
-  public Execution withArgs(Object args) {
-    return setArguments(args);
-  }
-
   public Execution withCollector(ResultCollector rs) {
     if (rs == null) {
       throw new FunctionException(
@@ -375,91 +371,6 @@ public class ServerRegionFunctionExecutor extends AbstractExecution {
     }
   }
 
-  @Override
-  public ResultCollector execute(String functionName, boolean hasResult) throws FunctionException
{
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    this.isFnSerializationReqd = false;
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      return executeFunction(functionName, hasResult, hasResult, false);
-    } else {
-      byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-          functionObject.hasResult(), functionObject.optimizeForWrite());
-
-      byte functionState = AbstractExecution.getFunctionState(hasResult, hasResult, false);
-      if (registeredFunctionState != functionState) {
-        throw new FunctionException(
-            LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-                .toLocalizedString(functionName));
-      }
-      return executeFunction(functionObject);
-    }
-  }
-
-  @Override
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA)
-      throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    this.isFnSerializationReqd = false;
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      return executeFunction(functionName, hasResult, isHA, false);
-    } else {
-      byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-          functionObject.hasResult(), functionObject.optimizeForWrite());
-
-      byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, false);
-      if (registeredFunctionState != functionState) {
-        throw new FunctionException(
-            LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-                .toLocalizedString(functionName));
-      }
-      return executeFunction(functionObject);
-    }
-  }
-
-  @Override
-  public ResultCollector execute(String functionName, boolean hasResult, boolean isHA,
-      boolean isOptimizeForWrite) throws FunctionException {
-    if (functionName == null) {
-      throw new FunctionException(
-          LocalizedStrings.ExecuteFunction_THE_INPUT_FUNCTION_FOR_THE_EXECUTE_FUNCTION_REQUEST_IS_NULL
-              .toLocalizedString());
-    }
-    this.isFnSerializationReqd = false;
-    if (isHA && !hasResult) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH.toLocalizedString());
-    }
-    Function functionObject = FunctionService.getFunction(functionName);
-    if (functionObject == null) {
-      return executeFunction(functionName, hasResult, isHA, isOptimizeForWrite);
-    } else {
-      byte registeredFunctionState = AbstractExecution.getFunctionState(functionObject.isHA(),
-          functionObject.hasResult(), functionObject.optimizeForWrite());
-
-      byte functionState = AbstractExecution.getFunctionState(isHA, hasResult, isOptimizeForWrite);
-      if (registeredFunctionState != functionState) {
-        throw new FunctionException(
-            LocalizedStrings.FunctionService_FUNCTION_ATTRIBUTE_MISMATCH_CLIENT_SERVER
-                .toLocalizedString(functionName));
-      }
-      return executeFunction(functionObject);
-    }
-  }
-
   public boolean getExecuteOnBucketSetFlag() {
     return this.executeOnBucketSet;
   }


Mime
View raw message