Atomically adds the given value to the current value of an entry's property.
Declaration Syntax
C# | Visual Basic | Visual C++ | J# |
public static Nullable<long> AddAndGet<T>( this ISpaceProxy spaceProxy, IdQuery<T> idQuery, string path, long delta, ITransaction transaction, ChangeModifiers modifiers, TimeSpan timeout )
<ExtensionAttribute> _ Public Shared Function AddAndGet(Of T) ( _ spaceProxy As ISpaceProxy, _ idQuery As IdQuery(Of T), _ path As String, _ delta As Long, _ transaction As ITransaction, _ modifiers As ChangeModifiers, _ timeout As TimeSpan _ ) As Nullable(Of Long)
[ExtensionAttribute] public: generic<typename T> static Nullable<long long> AddAndGet( ISpaceProxy^ spaceProxy, IdQuery<T>^ idQuery, String^ path, long long delta, ITransaction^ transaction, ChangeModifiers modifiers, TimeSpan timeout )
Generic Template Parameters
- T
- the type of the entry.
Parameters
- spaceProxy (ISpaceProxy)
- the proxy to the space which stores the entry.
- idQuery (IdQuery<(Of <(<'T>)>)>)
- id the query which is used to locate the entry.
- path (String)
- the path to the number property which is being modified.
- delta (Int64)
- the value to add.
- transaction (ITransaction)
- the transaction to use (null if no transaction is used).
- modifiers (ChangeModifiers)
- the change modifiers to use.
- timeout (TimeSpan)
- time to wait if the entry is locked under a transaction.
Return Value
the updated value, null of no matching entry found for the given id query. Therefore you must use the
primitive nullable types as the result value (e.g. int?/long?) otherwise you may get an exception if no entry was found.