示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void shutdownTheServer()
        public virtual void ShutdownTheServer()
        {
            if (_server != null)
            {
                _server.stop();
            }
        }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void stopServer()
        public virtual void StopServer()
        {
            if (_server != null)
            {
                _server.stop();
            }
        }
示例#3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void teardown()
        public virtual void Teardown()
        {
            if (_readOnlyServer != null)
            {
                _readOnlyServer.stop();
            }
        }
示例#4
0
        public override void RestartServer()
        {
            lock (this)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.logging.Log log = server.getDatabase().getGraph().getDependencyResolver().resolveDependency(org.neo4j.logging.internal.LogService.class).getUserLog(getClass());
                Log log = _server.Database.Graph.DependencyResolver.resolveDependency(typeof(LogService)).getUserLog(this.GetType());

                Thread thread = new Thread("Restart server thread" () =>
                {
                    log.Info("Restarting server");
                    _server.stop();
                    _server.start();
                });
                thread.Daemon = false;
                thread.Start();

                try
                {
                    thread.Join();
                }
                catch (InterruptedException e)
                {
                    throw new Exception(e);
                }
            }
        }
示例#5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterClass public static void stopServer()
        public static void StopServer()
        {
            if (_server != null)
            {
                _server.stop();
            }
        }
示例#6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterClass public static void stopServer() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public static void StopServer()
        {
            suppressAll().call((Callable <Void>)() =>
            {
                Server.stop();
                return(null);
            });
        }
示例#7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterClass public static void shutdownServer()
        public static void ShutdownServer()
        {
            try
            {
                if (_server != null)
                {
                    _server.stop();
                }
            }
            finally
            {
                _server = null;
            }
        }
示例#8
0
 private static void Shutdown()
 {
     lock (typeof(ServerHolder))
     {
         _allocation = null;
         try
         {
             if (_server != null)
             {
                 _server.stop();
             }
         }
         finally
         {
             _builder = null;
             _server  = null;
         }
     }
 }
示例#9
0
 public override void Close()
 {
     _server.stop();
     this._connectorPortRegister = null;
     try
     {
         _additionalClosable.Dispose();
     }
     catch (IOException e)
     {
         throw new Exception(e);
     }
     try
     {
         if (LooksLikeMd5Hash(_serverFolder.Name))
         {
             FileUtils.deleteRecursively(_serverFolder);
         }
     }
     catch (IOException e)
     {
         throw new Exception("Failed to clean up test server directory.", e);
     }
 }
示例#10
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @AfterClass public static void stopServer()
        public static void StopServer()
        {
            _server.stop();
        }
示例#11
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void stopTheServer()
            public virtual void StopTheServer()
            {
                Server.stop();
            }