protected ResultCollector executeFunction(final String functionId, boolean resultReq, boolean isHA, boolean optimizeForWrite) { try { if (proxyCache != null) { if (this.proxyCache.isClosed()) { throw new CacheClosedException("Cache is closed for this user."); } UserAttributes.userAttributes.set(this.proxyCache.getUserAttributes()); } byte hasResult = 0; if (resultReq) { // have Results hasResult = 1; if (this.rc == null) { // Default Result Collector ResultCollector defaultCollector = new DefaultResultCollector(); return executeOnServer(functionId, defaultCollector, hasResult, isHA, optimizeForWrite); } else { // Custome Result COllector return executeOnServer(functionId, this.rc, hasResult, isHA, optimizeForWrite); } } else { // No results executeOnServerNoAck(functionId, hasResult, isHA, optimizeForWrite); return new NoResult(); } } finally { UserAttributes.userAttributes.set(null); } }
protected ResultCollector executeFunction(final String functionId, boolean resultReq, boolean isHA, boolean optimizeForWrite) { try { if (proxyCache != null) { if (this.proxyCache.isClosed()) { throw new CacheClosedException("Cache is closed for this user."); } UserAttributes.userAttributes.set(this.proxyCache.getUserAttributes()); } byte hasResult = 0; if (resultReq) { // have Results hasResult = 1; if (this.rc == null) { // Default Result Collector ResultCollector defaultCollector = new DefaultResultCollector(); return executeOnServer(functionId, defaultCollector, hasResult, isHA, optimizeForWrite); } else { // Custome Result COllector return executeOnServer(functionId, this.rc, hasResult, isHA, optimizeForWrite); } } else { // No results executeOnServerNoAck(functionId, hasResult, isHA, optimizeForWrite); return new NoResult(); } } finally { UserAttributes.userAttributes.set(null); } }
@Override protected ResultCollector executeFunction(final Function function) { byte hasResult = 0; try { if (proxyCache != null) { if (this.proxyCache.isClosed()) { throw new CacheClosedException("Cache is closed for this user."); } UserAttributes.userAttributes.set(this.proxyCache.getUserAttributes()); } if (function.hasResult()) { // have Results hasResult = 1; if (this.rc == null) { // Default Result Collector ResultCollector defaultCollector = new DefaultResultCollector(); return executeOnServer(function, defaultCollector, hasResult); } else { // Custome Result COllector return executeOnServer(function, this.rc, hasResult); } } else { // No results executeOnServerNoAck(function, hasResult); return new NoResult(); } } finally { UserAttributes.userAttributes.set(null); } }
@Override protected ResultCollector executeFunction(final Function function) { byte hasResult = 0; try { if (proxyCache != null) { if (this.proxyCache.isClosed()) { throw new CacheClosedException("Cache is closed for this user."); } UserAttributes.userAttributes.set(this.proxyCache.getUserAttributes()); } if (function.hasResult()) { // have Results hasResult = 1; if (this.rc == null) { // Default Result Collector ResultCollector defaultCollector = new DefaultResultCollector(); return executeOnServer(function, defaultCollector, hasResult); } else { // Custome Result COllector return executeOnServer(function, this.rc, hasResult); } } else { // No results executeOnServerNoAck(function, hasResult); return new NoResult(); } } finally { UserAttributes.userAttributes.set(null); } }