Server

mill.server.Server
See theServer companion class
object Server

Attributes

Companion
class
Source
Server.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Server.type

Members list

Type members

Classlikes

case class Args(daemonDir: Path, acceptTimeout: Option[FiniteDuration], locks: Locks, bufferSize: Int, testLogEvenWhenServerIdWrong: Boolean = ...)

Value parameters

acceptTimeout

shuts down after this timeout if no clients are connected

bufferSize

size of the buffer used to read/write from/to the client

daemonDir

directory used for exchanging pre-TCP data with a client

Attributes

Source
Server.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ConnectionData(socketName: String, clientToServer: BufferedInputStream, serverToClient: BufferedOutputStream, initialSystemProperties: Map[String, String])

Attributes

Source
Server.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ConnectionTracker(serverLog: String => Unit, acceptTimeoutMillisOpt: Option[Long], serverSocket: ServerSocket, onChange: () => Unit = ...)

Attributes

Source
Server.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class DaemonState(pid: Long, activeConnections: Int, acceptingConnections: Boolean)

Atomic snapshot the daemon publishes so launchers can poll without an RPC round-trip.

Atomic snapshot the daemon publishes so launchers can poll without an RPC round-trip.

Attributes

Source
Server.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
@FunctionalInterface
trait SetIdle

Controls whether the server is considered idle.

Controls whether the server is considered idle.

Attributes

Source
Server.scala
Supertypes
class Object
trait Matchable
class Any
@FunctionalInterface
trait StopServer0[Handle]

Immediately stops the server with the given exit code.

Immediately stops the server with the given exit code.

Attributes

Source
Server.scala
Supertypes
class Object
trait Matchable
class Any

Types

type StopServer = StopServer0[Int]

Attributes

Source
Server.scala

Value members

Concrete methods

def checkProcessIdFile(processIdFile: Path, processId: String): Option[String]

Attributes

Source
Server.scala
def computeProcessId(): Long

Attributes

Source
Server.scala
def overrideSigIntHandling(handler: SignalHandler = ...): Unit

Attributes

Source
Server.scala
def readDaemonState(stateFile: Path): Option[DaemonState]

Read+parse the daemon state file; returns None if missing or unparseable.

Read+parse the daemon state file; returns None if missing or unparseable.

Attributes

Source
Server.scala
def tryLockBlock[T](lock: Lock, beforeClose: () => Unit, afterClose: () => Unit)(block: AutoCloseable => T): T

Attributes

Source
Server.scala
def watchProcessIdFile(processIdFile: Path, processId: Long, running: () => Boolean, exit: String => Unit): Unit

Runs a thread that invokes exit if the contents of processIdFile do not match processId.

Runs a thread that invokes exit if the contents of processIdFile do not match processId.

Attributes

Source
Server.scala
def writeDaemonState(stateFile: Path, state: DaemonState): Unit

Atomically write the daemon state JSON via tmp+rename so polling launchers never read a half-written file. Skips the write if the daemon directory has been deleted (e.g. by rm -rf out/); we never recreate it, since doing so would defeat tests/users that expect daemon shutdown when the out/ folder disappears.

Atomically write the daemon state JSON via tmp+rename so polling launchers never read a half-written file. Skips the write if the daemon directory has been deleted (e.g. by rm -rf out/); we never recreate it, since doing so would defeat tests/users that expect daemon shutdown when the out/ folder disappears.

Attributes

Source
Server.scala