public void UpdateQueueSize(CrawlrStorageManager storage, int xmlQueueSize, int urlQueueSize)
        {
            CrawlrQueueSize newSize         = new CrawlrQueueSize(xmlQueueSize, urlQueueSize);
            TableOperation  insertQueueSize = TableOperation.InsertOrReplace(newSize);

            storage.StatusTable.Execute(insertQueueSize);
        }
        public void UpdateCrawlrStatus(string currentStatus, CrawlrDataHelper data, CrawlrStorageManager storage)
        {
            WorkerRoleStatus currStatusEntity;

            if (currentStatus == "CLEAR")
            {
                currStatusEntity = new WorkerRoleStatus(
                    currentStatus,
                    (int)_cpuTime.NextValue(),
                    (int)_memoryFree.NextValue(),
                    0,
                    new System.Collections.Generic.Queue <string>()
                    );
            }
            else
            {
                currStatusEntity = new WorkerRoleStatus(
                    currentStatus,
                    (int)_cpuTime.NextValue(),
                    (int)_memoryFree.NextValue(),
                    data.NumUrlsCrawled,
                    data.LastTenUrls
                    );
            }

            TableOperation insertStatus = TableOperation.InsertOrReplace(currStatusEntity);

            storage.StatusTable.Execute(insertStatus);
        }