Esempio n. 1
0
        private int СlusterNodeFilterApply(void *target, long memPtr)
        {
            return(SafeCall(() =>
            {
                using (var stream = IgniteManager.Memory.Get(memPtr).GetStream())
                {
                    var reader = _ignite.Marshaller.StartUnmarshal(stream);

                    var filter = reader.ReadObject <IClusterNodeFilter>();

                    return filter.Invoke(_ignite.GetNode(reader.ReadGuid())) ? 1 : 0;
                }
            }));
        }
 /// <summary>
 /// Gets the node by id.
 /// </summary>
 /// <param name="id">The id.</param>
 /// <returns>Node.</returns>
 private IClusterNode GetNode(Guid?id)
 {
     return(_ignite.GetNode(id));
 }