// public void executeTaskRoutingAnnoation() { // MerchantUserTask task = new MerchantUserTask(2); //AsyncFuture<HashSet<Long>> result = proxy.execute(task); //HashSet<Long> hashSet = result.get(); //} public void executeDistributedTask() { MerchantByCategoryTask task = new MerchantByCategoryTask( ECategoryType.AUTOMOTIVE); //Execute the task on all the primary nodes with in the cluster List<Merchant> result = proxy.Execute(task); }
// public void executeTaskRoutingAnnoation() { // MerchantUserTask task = new MerchantUserTask(2); //AsyncFuture<HashSet<Long>> result = proxy.execute(task); //HashSet<Long> hashSet = result.get(); //} public void executeDistributedTask() { MerchantByCategoryTask task = new MerchantByCategoryTask( ECategoryType.AUTOMOTIVE); //Execute the task on all the primary nodes with in the cluster List <Merchant> result = proxy.Execute(task); }
public void executeDistributedTaskPartitions() { MerchantByCategoryTask task = new MerchantByCategoryTask( ECategoryType.AUTOMOTIVE); object[] ids = new object[3]{ 1, 2, 3 }; Merchant[] result = proxy.Execute(task, ids); }
public void executeDistributedTaskAsync() { MerchantByCategoryTask task = new MerchantByCategoryTask( ECategoryType.AUTOMOTIVE); IAsyncResult<List<Merchant>> asyncResult = proxy.BeginExecute(task, null /*callback*/, null /*state object*/); // ... //This will block until the result execution has arrived asyncResult.AsyncWaitHandle.WaitOne(); //Gets the actual result of the async execution List<Merchant> result = proxy.EndExecute(asyncResult); }
public void executeDistributedTaskPartitions() { MerchantByCategoryTask task = new MerchantByCategoryTask( ECategoryType.AUTOMOTIVE); object[] ids = new object[3] { 1, 2, 3 }; Merchant[] result = proxy.Execute(task, ids); }
public void executeDistributedTaskAsync() { MerchantByCategoryTask task = new MerchantByCategoryTask( ECategoryType.AUTOMOTIVE); IAsyncResult <List <Merchant> > asyncResult = proxy.BeginExecute(task, null /*callback*/, null /*state object*/); // ... //This will block until the result execution has arrived asyncResult.AsyncWaitHandle.WaitOne(); //Gets the actual result of the async execution List <Merchant> result = proxy.EndExecute(asyncResult); }