예제 #1
0
        protected Hashtable Clustered_Insert(ArrayList dests, object[] keys, CacheEntry[] cacheEntries, OperationContext operationContext)
        {
            try
            {
                if (ServerMonitor.MonitorActivity)
                {
                    ServerMonitor.LogClientActivity("RepCacheBase.InsertBlk", "enter");
                }
                /// Ask every server to update the object, except myself.
                Function func    = new Function((int)OpCodes.Insert, new object[] { keys, cacheEntries, operationContext }, false);
                RspList  results = Cluster.BroadcastToMultiple(dests,
                                                               func,
                                                               GroupRequest.GET_ALL);

                ClusterHelper.ValidateResponses(results, typeof(Hashtable), Name);

                /// Check if the operation failed on any node.
                return(ClusterHelper.FindAtomicBulkInsertStatusReplicated(results));
            }
            catch (CacheException e)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new GeneralFailureException(e.Message, e);
            }
            finally
            {
                if (ServerMonitor.MonitorActivity)
                {
                    ServerMonitor.LogClientActivity("RepCacheBase.InsertBlk", "exit");
                }
            }
        }