Oracle® Coherence .NET API Reference Release 3.7.1
E22844-03
Assembly: Coherence (in Coherence.dll) Version: 3.7.1.23 (3.7.1.23)
System..::.Object
Tangosol.Net.Cache.Support..::.DelegatingCacheListener
Tangosol.Net.Cache.Support..::.WindowsFormsCacheListener
E22844-03
Ensures that any event handling code that needs to run
as a response to a cache event is executed on the UI thread.
Namespace:
Tangosol.Net.Cache.SupportAssembly: Coherence (in Coherence.dll) Version: 3.7.1.23 (3.7.1.23)
Syntax
| C# |
|---|
public class WindowsFormsCacheListener : DelegatingCacheListener, ICacheListener |
Remarks
The crucial limiting factor when updating UI elements from a
background thread is the thread affinity Windows Forms controls
and forms have to the underlying thread that created them.
All Windows messages are actually messages between threads,
and each thread has its own message queue. Each and every thread
message can only be processed on the thread it belongs to.
When a thread creates a window, that window's messages are actually
messages destined for the message queue of the creating thread.
Consequently, all windows (such as forms and controls) can only
process messages on the thread that created them. Method calls on
forms and controls often result internally with posting of at least
one such message.
This class allows end users to ignore this fact and handle Coherence
cache events, which are always raised from a background thread, as
if they were raised within the UI thread. This class will ensure that
the call is properly marshalled and executed on the UI thread.
Inheritance Hierarchy
Tangosol.Net.Cache.Support..::.DelegatingCacheListener
Tangosol.Net.Cache.Support..::.WindowsFormsCacheListener