Пример #1
0
    //    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);
    }
Пример #2
0
    //	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);
    }
Пример #3
0
    public void executeDistributedTaskPartitions()
    {
        MerchantByCategoryTask task = new MerchantByCategoryTask(
            ECategoryType.AUTOMOTIVE);

        object[] ids  = new object[3]{ 1, 2, 3 };

        Merchant[] result = proxy.Execute(task, ids);
    }
Пример #4
0
    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);
    }
Пример #5
0
    public void executeDistributedTaskPartitions()
    {
        MerchantByCategoryTask task = new MerchantByCategoryTask(
            ECategoryType.AUTOMOTIVE);

        object[] ids = new object[3] {
            1, 2, 3
        };


        Merchant[] result = proxy.Execute(task, ids);
    }
Пример #6
0
    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);
    }