Ejemplo n.º 1
0
 public _IRunnable_670(ClientObjectContainer _enclosing, Transaction trans, ByRef
                       result)
 {
     this._enclosing = _enclosing;
     this.trans      = trans;
     this.result     = result;
 }
Ejemplo n.º 2
0
 public LazyClientQueryResult(Transaction trans, ClientObjectContainer client, int
                              queryResultID) : base(trans)
 {
     _client        = client;
     _queryResultID = queryResultID;
     _iterator      = new LazyClientIdIterator(this);
 }
		public LazyClientQueryResult(Transaction trans, ClientObjectContainer client, int
			 queryResultID) : base(trans)
		{
			_client = client;
			_queryResultID = queryResultID;
			_iterator = new LazyClientIdIterator(this);
		}
Ejemplo n.º 4
0
		public ClientSlotCacheImpl(ClientObjectContainer clientObjectContainer)
		{
			IEventRegistry eventRegistry = EventRegistryFactory.ForObjectContainer(clientObjectContainer
				);
			eventRegistry.Activated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
				(new _IEventListener4_29(this).OnEvent);
		}
 internal ClientMessageDispatcherImpl(ClientObjectContainer client, Socket4Adapter
                                      a_socket, BlockingQueue synchronousMessageQueue, BlockingQueue asynchronousMessageQueue
                                      )
 {
     _container = client;
     _synchronousMessageQueue  = synchronousMessageQueue;
     _asynchronousMessageQueue = asynchronousMessageQueue;
     _socket = a_socket;
 }
Ejemplo n.º 6
0
 internal ClientMessageDispatcherImpl(ClientObjectContainer client, Socket4Adapter
     a_socket, BlockingQueue synchronousMessageQueue, BlockingQueue asynchronousMessageQueue
     )
 {
     _container = client;
     _synchronousMessageQueue = synchronousMessageQueue;
     _asynchronousMessageQueue = asynchronousMessageQueue;
     _socket = a_socket;
 }
Ejemplo n.º 7
0
 /// <exception cref="System.Exception"></exception>
 public virtual void TestIsAliveInMultiThread()
 {
     IBlockingQueue4 barrier = new BlockingQueue();
     client = (ClientObjectContainer) OpenNewSession();
     client.MessageListener(new _IMessageListener_23(this, barrier));
     var workThread = new Thread(new _IRunnable_38(), "Quering");
     workThread.SetDaemon(true);
     workThread.Start();
     barrier.Next();
     client.IsAlive();
 }
Ejemplo n.º 8
0
        public virtual int PrefetchObjects(ClientObjectContainer container, Transaction trans
                                           , IIntIterator4 ids, object[] prefetched, int prefetchCount)
        {
            int   count    = 0;
            IList idsToGet = new ArrayList();

            while (count < prefetchCount)
            {
                if (!ids.MoveNext())
                {
                    break;
                }
                int id = ids.CurrentInt();
                if (id > 0)
                {
                    object obj = trans.ObjectForIdFromCache(id);
                    if (obj != null)
                    {
                        prefetched[count] = obj;
                    }
                    else
                    {
                        idsToGet.Add(Pair.Of(id, count));
                    }
                    count++;
                }
            }
            if (idsToGet.Count > 0)
            {
                ByteArrayBuffer[] buffers = container.ReadObjectSlots(trans, IdArrayFor(idsToGet)
                                                                      );
                for (int i = 0; i < buffers.Length; i++)
                {
                    Pair   pair     = ((Pair)idsToGet[i]);
                    int    id       = (((int)pair.first));
                    int    position = (((int)pair.second));
                    object obj      = trans.ObjectForIdFromCache(id);
                    if (obj != null)
                    {
                        prefetched[position] = obj;
                    }
                    else
                    {
                        prefetched[position] = new ObjectReference(id).ReadPrefetch(trans, buffers[i], Const4
                                                                                    .AddToIdTree);
                    }
                }
            }
            return(count);
        }
		public virtual int PrefetchObjects(ClientObjectContainer container, Transaction trans
			, IIntIterator4 ids, object[] prefetched, int prefetchCount)
		{
			int count = 0;
			IList idsToGet = new ArrayList();
			while (count < prefetchCount)
			{
				if (!ids.MoveNext())
				{
					break;
				}
				int id = ids.CurrentInt();
				if (id > 0)
				{
					object obj = trans.ObjectForIdFromCache(id);
					if (obj != null)
					{
						prefetched[count] = obj;
					}
					else
					{
						idsToGet.Add(Pair.Of(id, count));
					}
					count++;
				}
			}
			if (idsToGet.Count > 0)
			{
				ByteArrayBuffer[] buffers = container.ReadObjectSlots(trans, IdArrayFor(idsToGet)
					);
				for (int i = 0; i < buffers.Length; i++)
				{
					Pair pair = ((Pair)idsToGet[i]);
					int id = (((int)pair.first));
					int position = (((int)pair.second));
					object obj = trans.ObjectForIdFromCache(id);
					if (obj != null)
					{
						prefetched[position] = obj;
					}
					else
					{
						prefetched[position] = new ObjectReference(id).ReadPrefetch(trans, buffers[i], Const4
							.AddToIdTree);
					}
				}
			}
			return count;
		}
Ejemplo n.º 10
0
		internal BlobProcessor(ClientObjectContainer aStream)
		{
			stream = aStream;
		}
Ejemplo n.º 11
0
 internal BlobProcessor(ClientObjectContainer aStream)
 {
     stream = aStream;
 }
Ejemplo n.º 12
0
 public _IEventListener4_145(ClientObjectContainer _enclosing)
 {
     this._enclosing = _enclosing;
 }
Ejemplo n.º 13
0
			public _ICodeBlock_27(ClientObjectContainer client)
			{
				this.client = client;
			}
Ejemplo n.º 14
0
		public ClientHeartbeat(ClientObjectContainer container)
		{
			_container = container;
			_timer = new SimpleTimer(this, Frequency(container.ConfigImpl));
		}
Ejemplo n.º 15
0
			public _IClosure4_58(ClientObjectContainer client, BooleanByRef eventRaised, Lock4
				 Lock)
			{
				this.client = client;
				this.eventRaised = eventRaised;
				this.Lock = Lock;
			}
Ejemplo n.º 16
0
 public ClientHeartbeat(ClientObjectContainer container)
 {
     _container = container;
     _timer     = new SimpleTimer(this, Frequency(container.ConfigImpl));
 }
Ejemplo n.º 17
0
			public _IRunnable_670(ClientObjectContainer _enclosing, Transaction trans, ByRef 
				result)
			{
				this._enclosing = _enclosing;
				this.trans = trans;
				this.result = result;
			}
Ejemplo n.º 18
0
		public virtual void MessageListener(ClientObjectContainer.IMessageListener listener
			)
		{
			_messageListener = listener;
		}
Ejemplo n.º 19
0
		public ClientEventRegistryImpl(ClientObjectContainer container)
		{
			_container = container;
		}
Ejemplo n.º 20
0
			public _IEventListener4_145(ClientObjectContainer _enclosing)
			{
				this._enclosing = _enclosing;
			}
Ejemplo n.º 21
0
			public _ICodeBlock_27(ClientObjectContainer client1)
			{
				this.client1 = client1;
			}
Ejemplo n.º 22
0
 internal ClientTransaction(ClientObjectContainer container, Transaction parentTransaction
                            , IReferenceSystem referenceSystem) : base(container, parentTransaction, referenceSystem
                                                                       )
 {
     _client = container;
 }
		internal ClientTransaction(ClientObjectContainer container, Transaction parentTransaction
			, IReferenceSystem referenceSystem) : base(container, parentTransaction, referenceSystem
			)
		{
			_client = container;
		}