Exemplo n.º 1
0
        internal void Add(int docId, Hubble.Core.Data.Payload payLoad, PayloadProvider payloadProvider)
        {
            HBMonitor.Enter(_LockObj);

            try
            {
                _PayloadEntities.Add(new PayloadEntity(docId, payLoad, payloadProvider));
            }
            finally
            {
                HBMonitor.Exit(_LockObj);
            }
            //ASendMessage((int)Event.Add, new PayloadEntity(docId, payLoad, payloadProvider));
        }
Exemplo n.º 2
0
        public DateTime SetPayloadLastWriteTime(DateTime time)
        {
            HBMonitor.Enter(_LockObj);

            try
            {
                System.IO.File.SetLastWriteTime(_FileName, time);

                return(System.IO.File.GetLastWriteTime(_FileName));
            }
            finally
            {
                HBMonitor.Exit(_LockObj);
            }
        }
Exemplo n.º 3
0
        internal void Update(IList <int> docIds, IList <Data.Payload> payloads, PayloadProvider payloadProvider)
        {
            List <PayloadEntity> peList = new List <PayloadEntity>();

            for (int i = 0; i < docIds.Count; i++)
            {
                peList.Add(new PayloadEntity(docIds[i], payloads[i], payloadProvider));
            }

            HBMonitor.Enter(_LockObj);

            try
            {
                UpdateToFile(peList);
            }
            finally
            {
                HBMonitor.Exit(_LockObj);
            }

            //SSendMessage((int)Event.Update, peList, int.MaxValue);
        }