• Facebook
  • Twitter
  • Youtube
  • LinkedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Try NCache
  • Contact Us
Try NCache
Show / Hide Table of Contents

Method Invoke

Invoke(IEnumerable<String>, IEntryProcessor, ReadThruOptions, WriteThruOptions, Object[])

Execution of entry processor on a set of keys (regardless of caching topology used), allows to execute code against a set of cache entries on server-side, without fetching any data on client-side.

Declaration
[Obsolete("This feature is not in active development and may be removed in a future update.")]
ICollection Invoke(IEnumerable<string> keys, IEntryProcessor entryProcessor, ReadThruOptions readThruOption = null, WriteThruOptions writeThruOption = null, params object[] arguments)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> keys

Set of keys of Cache entries on which EntryProcessor will be executed.

Alachisoft.NCache.Runtime.Processor.IEntryProcessor entryProcessor

IEntryProcessor instance.

ReadThruOptions readThruOption

ReadThruOptions to read from data source. These can be either ReadThru, ReadThruForced or none.

WriteThruOptions writeThruOption

WriteThruOptions regarding updating the data source. This can be either WriteThru, WriteBehind or none.

System.Object[] arguments

Arguments list for the process.

Returns
Type Description
System.Collections.ICollection

Returns a collection of instances of IEntryProcessorResult.

Examples
ICache cache = CacheManager.GetCache("demoClusteredCache");

//Get a new instance of sample Class implementing EntryProcessor interface.
CustomEntryProcessor myProcessor = new CustomEntryProcessor();
string[] keys = new string[] { "1", "5", "12", "15" };

cache.Insert(keys[0], "Value1");
cache.Insert(keys[1], "Value1");
cache.Insert(keys[2], "Value1");
cache.Insert(keys[3], "Value1");
//Invoking the Entry processor against a set of items.

ReadThruOptions readThruOptions = new ReadThruOptions(ReadMode.ReadThru, "ProdDataSource");
WriteThruOptions writeThruOptions = new WriteThruOptions(WriteMode.WriteThru, "ProdDataSource");

ICollection retEntries = cache.ExecutionService.Invoke(keys, myProcessor,readThruOptions,writeThruOptions);

Invoke(String, IEntryProcessor, ReadThruOptions, WriteThruOptions, Object[])

Execution of entry processor (regardless of caching topology used), allows to execute code against a cache entry on server-side, without fetching any data on client-side.

Declaration
[Obsolete("This feature is not in active development and may be removed in a future update.")]
object Invoke(string key, IEntryProcessor entryProcessor, ReadThruOptions readThruOption = null, WriteThruOptions writeThruOption = null, params object[] arguments)
Parameters
Type Name Description
System.String key

Key of Cache entry on which the EntryProcessor is executed.

Alachisoft.NCache.Runtime.Processor.IEntryProcessor entryProcessor

IEntryProcessor instance

ReadThruOptions readThruOption

ReadThruOptions to read from data source. These can be either ReadThru, ReadThruForced or none.

WriteThruOptions writeThruOption

WriteThruOptions regarding updating the data source. This can be either WriteThru, WriteBehind or none.

System.Object[] arguments

Arguments list for the process.

Returns
Type Description
System.Object

Returns an instance of IEntryProcessorResult.

Examples
ICache cache = CacheManager.GetCache("demoClusteredCache");

//Get a new instance of sample Class implementing EntryProcessor interface.
CustomEntryProcessor myProcessor = new CustomEntryProcessor();
string[] keys = new string[] { "1", "5", "12", "15" };

cache.Insert(keys[0], "Value1");
cache.Insert(keys[1], "Value1");
cache.Insert(keys[2], "Value1");
cache.Insert(keys[3], "Value1");
//Invoking the Entry processor against a set of items.

ReadThruOptions readThruOptions = new ReadThruOptions(ReadMode.ReadThru, "ProdDataSource");
WriteThruOptions writeThruOptions = new WriteThruOptions(WriteMode.WriteThru, "ProdDataSource");
Object invokerVal = cache.ExecutionService.Invoke(keys[2], myProcessor,readThruOptions,writeThruOptions);

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Try NCache
Pricing
NCache Playground

Deployments
  • Cloud
  • Docker
  • Kubernetes
  • On-Premises
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • SignalR Backplane
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Blogs
  • Foundations
  • Videos
  • Comparisons
  • Shows
  • Whitepapers
  • Articles
  • Tech Talks
  • Magazine Articles
  • Third-Party Articles
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Docs
  • Schedule a Demo
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Terms of Use
  •  
  • Privacy Policy
  •  
  • Cookie Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
  • Facebook
  • Twitter
  • Youtube
  • LinkedIn
  • RSS