/// <summary> /// Constructor. /// </summary> /// <param name="typeId">Type ID.</param> /// <param name="typeName">Type name.</param> /// <param name="affKeyFieldName">Affinity key field name.</param> public PortableMetadataHolder(int typeId, string typeName, string affKeyFieldName) { _typeId = typeId; _typeName = typeName; _affKeyFieldName = affKeyFieldName; _emptyMeta = new PortableMetadataImpl(typeId, typeName, null, affKeyFieldName); }
public void OnEvent(IEnumerable <ICacheEntryEvent <int, IPortableObject> > evts) { foreach (ICacheEntryEvent <int, IPortableObject> evt in evts) { IPortableObject val = evt.Value; IPortableMetadata meta = val.Metadata(); Assert.AreEqual(typeof(PortableEntry).Name, meta.TypeName); } countDown.Signal(); }
/// <summary> /// Gets metadata for the given type ID. /// </summary> /// <param name="typeId">Type ID.</param> /// <returns>Metadata or null.</returns> public IPortableMetadata Metadata(int typeId) { if (Ignite != null) { IPortableMetadata meta = Ignite.Metadata(typeId); if (meta != null) { return(meta); } } return(PortableMetadataImpl.EmptyMeta); }