Beispiel #1
0
 private void CloseMessageDispatcher()
 {
     try
     {
         if (!_singleThreaded)
         {
             _messageDispatcher.Close();
         }
     }
     catch (Exception e)
     {
         Exceptions4.CatchAllExceptDb4oException(e);
     }
     try
     {
         if (!_singleThreaded)
         {
             _asynchronousMessageProcessor.StopProcessing();
         }
     }
     catch (Exception e)
     {
         Exceptions4.CatchAllExceptDb4oException(e);
     }
 }
 internal void CheckClosed()
 {
     if (_container == null)
     {
         Exceptions4.ThrowRuntimeException(Db4objects.Db4o.Internal.Messages.ClosedOrOpenFailed
                                           , _name);
     }
     _container.CheckClosed();
 }
 public virtual void DefragIndexEntry(DefragmentContextImpl context)
 {
     try
     {
         Read1(context.SourceBuffer());
         Read1(context.TargetBuffer());
     }
     catch (CorruptionException)
     {
         Exceptions4.VirtualException();
     }
 }
Beispiel #4
0
        /// <exception cref="Db4objects.Db4o.Ext.OldFormatException"></exception>
        public static FileHeader Read(LocalObjectContainer file)
        {
            ByteArrayBuffer reader = PrepareFileHeaderReader(file);
            FileHeader      header = DetectFileHeader(file, reader);

            if (header == null)
            {
                Exceptions4.ThrowRuntimeException(Db4objects.Db4o.Internal.Messages.IncompatibleFormat
                                                  , file.ToString());
            }
            else
            {
                header.Read(file, reader);
            }
            return(header);
        }
Beispiel #5
0
        /// <exception cref="Db4objects.Db4o.Ext.OldFormatException"></exception>
        public static FileHeader Read(LocalObjectContainer file)
        {
            var reader = PrepareFileHeaderReader(file);
            var header = DetectFileHeader(file, reader);

            if (header == null)
            {
                Exceptions4.ThrowRuntimeException(Messages.IncompatibleFormat
                                                  , file.ToString());
            }
            else
            {
                header.Read(file, reader);
            }
            return(header);
        }
Beispiel #6
0
 protected override void Close2()
 {
     if ((!_singleThreaded) && (_messageDispatcher == null || !_messageDispatcher.IsMessageDispatcherAlive
                                    ()))
     {
         StopHeartBeat();
         ShutdownObjectContainer();
         return;
     }
     try
     {
         Commit1(_transaction);
     }
     catch (Exception e)
     {
         Exceptions4.CatchAllExceptDb4oException(e);
     }
     try
     {
         Write(Msg.Close);
     }
     catch (Exception e)
     {
         Exceptions4.CatchAllExceptDb4oException(e);
     }
     ShutDownCommunicationRessources();
     try
     {
         _socket.Close();
     }
     catch (Exception e)
     {
         Exceptions4.CatchAllExceptDb4oException(e);
     }
     ShutdownObjectContainer();
 }
Beispiel #7
0
 /// <param name="candidate"></param>
 internal virtual bool Evaluate(QCandidate candidate)
 {
     throw Exceptions4.VirtualException();
 }
Beispiel #8
0
 public override void ReadBytes(byte[] bytes, int address, int addressOffset, int
                                length)
 {
     throw Exceptions4.VirtualException();
 }