Java client utils. More...
Static Public Member Functions | |
| static byte[] | ToBytes (Guid id) |
| Converts Guid to a bytes array in Java format. | |
| static Guid | BytesToGuid (byte[] java, int off) |
| Converts bytes array representation of Java UUID into C# Guid. | |
| static byte[] | ToBytes (short val) |
Converts primitive short type to byte array. | |
| static byte[] | ToBytes (int val) |
Converts primitive int type to byte array. | |
| static byte[] | ToBytes (long val) |
Converts primitive long type to byte array. | |
| static byte[] | ToBytes (float val) |
Converts primitive float type to byte array. | |
| static byte[] | ToBytes (double val) |
Converts primitive double type to byte array. | |
| static short | BytesToInt16 (byte[] buf, int off) |
Constructs short from byte array. | |
| static int | BytesToInt32 (byte[] buf, int off) |
Constructs int from byte array. | |
| static long | BytesToInt64 (byte[] buf, int off) |
Constructs long from byte array. | |
| static float | BytesToSingle (byte[] buf, int off) |
Constructs float from byte array. | |
| static double | BytesToDouble (byte[] buf, int off) |
Constructs double from byte array. | |
| static IList< T > | ApplyFilter< T > (IEnumerable< T > elements, Predicate< T > filter) |
| Applies filter and returns filtered collection of nodes. | |
| static Predicate< T > | All< T > () |
| All predicate. | |
| static Predicate< T > | And< T > (Predicate< T > first, Predicate< T > second) |
AND predicate. Passes if and only if both provided filters accept the node. This filter uses short-term condition evaluation, i.e. second filter would not be invoked if first filter returned false. | |
| static Predicate< T > | Filter< T > (ICollection< T > inc, ICollection< T > exc) |
| Filter predicate. | |
| static Predicate< T > | Contains< T > (ICollection< T > items) |
| Creates a predicates that checks if given value is contained in the items collection. | |
| static void | DoSilent< TException > (Action job, Action< TException > handler) |
| Do job and hide exception if happens. | |
| static DateTime | Timestamp (long timestamp) |
| Convert unix timestamp (ms) into the DateTime object. | |
| static bool | Sleep (TimeSpan delay) |
| Blocks the current thread for a specified time. | |
| static IList< T > | List< T > (params T[] array) |
| Convert list of arguments into the list. | |
| static IGridClientFuture< T > | Async< T > (Func< T > func) |
| Execute function in background thread. | |
| static IGridClientFuture | Async (Action action) |
| Execute action in background thread. | |
| static void | AddAll< T > (this ICollection< T > collection, IEnumerable< T > newItems) |
| Add all items from the passed collection to this one. | |
| static IDictionary | ToMap< TKey, TVal > (this IDictionary< TKey, TVal > source) |
| Extend generic maps with conversions into not-generic ones. | |
| static IDictionary< TKey, TVal > | ToMap< TKey, TVal > (this IDictionary source) |
| Extend base maps with conversions into generic ones. | |
| static IDictionary< TKey, TVal > | ToNullable< TKey, TVal > (this IDictionary< TKey, TVal > source) |
| Wrap specified map with null-key allowed dictionary (if required). | |
Properties | |
| static DateTime | Now [get] |
| Gets current date and time on this computer, expressed as the local time. | |
| static DateTime | Epoch [get] |
| Unix epoch start point "1970-01-01 00:00:00.0 UTC" as the local time. | |
| static void GridGain.Client.Util.GridClientUtils.AddAll< T > | ( | this ICollection< T > | collection, | |
| IEnumerable< T > | newItems | |||
| ) | [static] |
| collection | This collection to add new items to. | |
| newItems | Collection of items to add to this one. |
| static Predicate<T> GridGain.Client.Util.GridClientUtils.All< T > | ( | ) | [static] |
| static Predicate<T> GridGain.Client.Util.GridClientUtils.And< T > | ( | Predicate< T > | first, | |
| Predicate< T > | second | |||
| ) | [static] |
| first | First filter to check. | |
| second | Second filter to check. |
| static IList<T> GridGain.Client.Util.GridClientUtils.ApplyFilter< T > | ( | IEnumerable< T > | elements, | |
| Predicate< T > | filter | |||
| ) | [static] |
| elements | Nodes to be filtered. | |
| filter | Filter to apply |
| T | : | class |
| static IGridClientFuture GridGain.Client.Util.GridClientUtils.Async | ( | Action | action | ) | [static] |
| action | Action to execute in background thread. |
| static IGridClientFuture<T> GridGain.Client.Util.GridClientUtils.Async< T > | ( | Func< T > | func | ) | [static] |
| func | Function to execute in background thread. |
| static double GridGain.Client.Util.GridClientUtils.BytesToDouble | ( | byte[] | buf, | |
| int | off | |||
| ) | [static] |
| buf | Array of bytes. | |
| off | Offset in bytes array. |
| static Guid GridGain.Client.Util.GridClientUtils.BytesToGuid | ( | byte[] | java, | |
| int | off | |||
| ) | [static] |
| java | Java UUID as bytes array. | |
| off | Offset in the bytes array. |
| static short GridGain.Client.Util.GridClientUtils.BytesToInt16 | ( | byte[] | buf, | |
| int | off | |||
| ) | [static] |
| buf | Array of bytes. | |
| off | Offset in bytes array. |
| static int GridGain.Client.Util.GridClientUtils.BytesToInt32 | ( | byte[] | buf, | |
| int | off | |||
| ) | [static] |
| buf | Array of bytes. | |
| off | Offset in bytes array. |
| static long GridGain.Client.Util.GridClientUtils.BytesToInt64 | ( | byte[] | buf, | |
| int | off | |||
| ) | [static] |
| buf | Array of bytes. | |
| off | Offset in bytes array. |
| static float GridGain.Client.Util.GridClientUtils.BytesToSingle | ( | byte[] | buf, | |
| int | off | |||
| ) | [static] |
| buf | Array of bytes. | |
| off | Offset in bytes array. |
| static Predicate<T> GridGain.Client.Util.GridClientUtils.Contains< T > | ( | ICollection< T > | items | ) | [static] |
| items | Collection of valid items. |
| static void GridGain.Client.Util.GridClientUtils.DoSilent< TException > | ( | Action | job, | |
| Action< TException > | handler | |||
| ) | [static] |
| job | Job to execute. | |
| handler | Exception handler. |
| TException | : | Exception |
| static Predicate<T> GridGain.Client.Util.GridClientUtils.Filter< T > | ( | ICollection< T > | inc, | |
| ICollection< T > | exc | |||
| ) | [static] |
| static IList<T> GridGain.Client.Util.GridClientUtils.List< T > | ( | params T[] | array | ) | [static] |
| array | Variable arguments collection of items to add into list. |
| static bool GridGain.Client.Util.GridClientUtils.Sleep | ( | TimeSpan | delay | ) | [static] |
| delay | Amount of time for which the thread is blocked. |
| static DateTime GridGain.Client.Util.GridClientUtils.Timestamp | ( | long | timestamp | ) | [static] |
| static byte [] GridGain.Client.Util.GridClientUtils.ToBytes | ( | Guid | id | ) | [static] |
| id | Guid to convert. |
| static byte [] GridGain.Client.Util.GridClientUtils.ToBytes | ( | int | val | ) | [static] |
| val | Integer value. |
| static byte [] GridGain.Client.Util.GridClientUtils.ToBytes | ( | long | val | ) | [static] |
| val | Long value. |
| static byte [] GridGain.Client.Util.GridClientUtils.ToBytes | ( | double | val | ) | [static] |
| val | Double value. |
| static byte [] GridGain.Client.Util.GridClientUtils.ToBytes | ( | short | val | ) | [static] |
| val | Short value. |
| static byte [] GridGain.Client.Util.GridClientUtils.ToBytes | ( | float | val | ) | [static] |
| val | Float value. |
| static IDictionary GridGain.Client.Util.GridClientUtils.ToMap< TKey, TVal > | ( | this IDictionary< TKey, TVal > | source | ) | [static] |
| source | Generic map to convert into not-generic one. |
| static IDictionary<TKey, TVal> GridGain.Client.Util.GridClientUtils.ToMap< TKey, TVal > | ( | this IDictionary | source | ) | [static] |
| source | Not-generic map to convert into generic one. |
| static IDictionary<TKey, TVal> GridGain.Client.Util.GridClientUtils.ToNullable< TKey, TVal > | ( | this IDictionary< TKey, TVal > | source | ) | [static] |
| source | Map to wrap with null-key allowed one. |
DateTime GridGain.Client.Util.GridClientUtils.Epoch [static, get] |
DateTime GridGain.Client.Util.GridClientUtils.Now [static, get] |
1.7.1