ExtractorEventTransformer Class |
Namespace: Tangosol.Util.Transformer
public class ExtractorEventTransformer : ICacheEventTransformer, IPortableObject
The ExtractorEventTransformer type exposes the following members.
| Name | Description | |
|---|---|---|
| ExtractorEventTransformer |
Default constructor.
| |
| ExtractorEventTransformer(String) |
Construct a ExtractorEventTransformer that transforms
CacheEventArgs's values based on the specified method name.
| |
| ExtractorEventTransformer(IValueExtractor) |
Construct a ExtractorEventTransformer that transforms
CacheEventArgs values based on the specified extractor.
| |
| ExtractorEventTransformer(IValueExtractor, IValueExtractor) |
Construct a ExtractorEventTransformer that transforms
CacheEventArgs values based on the specified extractors.
|
| Name | Description | |
|---|---|---|
| NewValueExtractor |
Return a IValueExtractor used to transfrom the event's
NewValue.
| |
| OldValueExtractor |
Return a IValueExtractor used to transfrom the event's
OldValue.
|
| Name | Description | |
|---|---|---|
| Equals(Object) |
Compare the ExtractorEventTransformer with another object
to determine equality.
(Overrides ObjectEquals(Object).) | |
| Equals(ExtractorEventTransformer) |
Compare the ExtractorEventTransformer with another object
to determine equality.
| |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode |
Determine a hash value for the ExtractorEventTransformer
object according to the general Object.GetHashCode
contract.
(Overrides ObjectGetHashCode.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| ReadExternal |
Restore the contents of a user type instance by reading its state
using the specified IPofReader object.
| |
| ToString |
Provide a human-readable representation of this object.
(Overrides ObjectToString.) | |
| Transform |
Transform the specified CacheEventArgs using the
corresponding extractors.
| |
| WriteExternal |
Save the contents of a POF user type instance by writing its
state using the specified IPofWriter object.
|
Example: the following code will register a listener to receive events only if the value of the "AccountBalance" property changes. The transformed event's "NewValue" will be a IList containing the "LastTransactionTime" and "AccountBalance" properties. The "OldValue" will always be null.
IFilter filter = new ValueChangeEventFilter("AccountBalance"); IValueExtractor extractor = new MultiExtractor("LastTransactionTime,AccountBalance"); ICacheEventTransformer transformer = new ExtractorEventTransformer(null, extractor); cache.AddCacheListener(listener, new CacheEventTransformerFilter(filter, transformer), false);