Method Invoke
Invoke(string, byte[], TimeSpan?)
Invokes a server-side parallel method invocation operation against all objects in the cache.
public InvokeResponse Invoke(string operationId, byte[] param, TimeSpan? invokeTimeout = null)
Parameters
operationId
stringString identifier of the operation to invoke. Corresponds to an operation ID registered on the server side using SetInvokeHandler<TKey, TValue>(Cache<TKey, TValue>, string, InvokeHandler<TKey, TValue>).
param
byte[]Optional, arbitrary parameter to send to the invocation handler, serialized as a byte array.
invokeTimeout
TimeSpan?The amount of time allowed for this operation. After the
expires, the operation will be canceled. You may specify null or Zero if you want the operation to continue no matter how long it takes. If the timeout elapses, a TimeoutException or OperationCanceledException will be thrown (depending on whether the timeout occurred in the service or in the client process).
Returns
- InvokeResponse
InvokeResponse indicating the outcome of the operation. Result will be set to InvokeCompleted if successful or UnhandledExceptionInCallback if the callback handling the invoke operation in the server threw an unhandled exception. If the callback implementation returns a result, use ResultObject to get the serialized result object.
Remarks
The Result property of the response will contain one of the following ServerResult outcomes:
ServerResult | Description |
---|---|
InvokeCompleted | The invoke operation completed successfully. Use ResultObject to get the serialized object returned from the Invoke callback. |
UnhandledExceptionInCallback | An unhandled exception was thrown from the callback handling the invocation event. Check ErrorData for details (this is typically a UTF8 encoded string, but if a different library processed the event on the server then another encoding may have been used). |
Exceptions
- NotReadyException
The ScaleOut service is not yet ready to perform this operation, typically because there was no application registered to handle events for this cache.
- TimeoutException
The operation timed out in the server and the
invokeTimeout
elapsed.- OperationCanceledException
The operation timed out, typically because too many pending requests accumulated in the client and the
invokeTimeout
elapsed.
- See Also
Invoke(string, byte[], string, TimeSpan?)
Invokes a server-side parallel method invocation operation against all objects in the cache. The operation will be handled remotely on ScaleOut hosts in an Invocation Grid worker process.
public InvokeResponse Invoke(string operationId, byte[] param, string invocationGrid, TimeSpan? invokeTimeout = null)
Parameters
operationId
stringString identifier of the operation to invoke. Corresponds to an operation ID registered on the server side using SetInvokeHandler<TKey, TValue>(Cache<TKey, TValue>, string, InvokeHandler<TKey, TValue>).
param
byte[]Optional, arbitrary parameter to send to the invocation handler, serialized as a byte array.
invocationGrid
stringThe name of the invocation grid that will handle the server-side invocation.
invokeTimeout
TimeSpan?The amount of time allowed for this operation. After the
expires, the operation will be canceled. You may specify null or Zero if you want the operation to continue no matter how long it takes. If the timeout elapses, a TimeoutException or OperationCanceledException will be thrown (depending on whether the timeout occurred in the service or in the client process).
Returns
- InvokeResponse
InvokeResponse indicating the outcome of the operation. Result will be set to InvokeCompleted if successful or UnhandledExceptionInCallback if the callback handling the invoke operation in the server threw an unhandled exception. If the callback implementation returns a result, use ResultObject to get the serialized result object.
Remarks
The Result property of the response will contain one of the following ServerResult outcomes:
ServerResult | Description |
---|---|
InvokeCompleted | The invoke operation completed successfully. Use ResultObject to get the serialized object returned from the Invoke callback. |
UnhandledExceptionInCallback | An unhandled exception was thrown from the callback handling the invocation event. Check ErrorData for details (this is typically a UTF8 encoded string, but if a different library processed the event on the server then another encoding may have been used). |
Exceptions
- NotReadyException
The ScaleOut service is not yet ready to perform this operation, typically because there was no application registered to handle events for this cache.
- TimeoutException
The operation timed out in the server and the
invokeTimeout
elapsed.- OperationCanceledException
The operation timed out, typically because too many pending requests accumulated in the client and the
invokeTimeout
elapsed.
- See Also
Invoke(string, byte[], uint, TimeSpan?)
Invokes a server-side parallel method invocation operation against all objects in the cache. The operation will be handled remotely on ScaleOut hosts in an Invocation Grid worker process. (This overload is typically only used to support internal product infrastructure.)
public InvokeResponse Invoke(string operationId, byte[] param, uint igID, TimeSpan? invokeTimeout = null)
Parameters
operationId
stringString identifier of the operation to invoke. Corresponds to an operation ID registered on the server side using SetInvokeHandler<TKey, TValue>(Cache<TKey, TValue>, string, InvokeHandler<TKey, TValue>).
param
byte[]Optional, arbitrary parameter to send to the invocation handler, serialized as a byte array.
igID
uintThe identifier of the invocation grid that will handle the server-side invocation.
invokeTimeout
TimeSpan?The amount of time allowed for this operation. After the
expires, the operation will be canceled. You may specify null or Zero if you want the operation to continue no matter how long it takes. If the timeout elapses, a TimeoutException or OperationCanceledException will be thrown (depending on whether the timeout occurred in the service or in the client process).
Returns
- InvokeResponse
InvokeResponse indicating the outcome of the operation. Result will be set to InvokeCompleted if successful or UnhandledExceptionInCallback if the callback handling the invoke operation in the server threw an unhandled exception. If the callback implementation returns a result, use ResultObject to get the serialized result object.
Remarks
This overload is intended for use in rare scenarios when the service's internal numeric Invocation Grid identifier is known but its string name is not.
The Result property of the response will contain one of the following ServerResult outcomes:
ServerResult | Description |
---|---|
InvokeCompleted | The invoke operation completed successfully. Use ResultObject to get the serialized object returned from the Invoke callback. |
UnhandledExceptionInCallback | An unhandled exception was thrown from the callback handling the invocation event. Check ErrorData for details (this is typically a UTF8 encoded string, but if a different library processed the event on the server then another encoding may have been used). |
Exceptions
- NotReadyException
The ScaleOut service is not yet ready to perform this operation, typically because there was no application registered to handle events for this cache.
- TimeoutException
The operation timed out in the server and the
invokeTimeout
elapsed.- OperationCanceledException
The operation timed out, typically because too many pending requests accumulated in the client and the
invokeTimeout
elapsed.
- See Also