Skip to content

Commit

Permalink
Minor doc fixes (#653)
Browse files Browse the repository at this point in the history
* Minor doc fixes

* Few more
  • Loading branch information
benblack86 committed Dec 14, 2017
1 parent 73c52bc commit f58d9c0
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 26 deletions.
Expand Up @@ -14,7 +14,7 @@ trait TagGenerator {
/**
* Configuration class for the metric reporter
* @param metricSenders A list of [[MetricSender]] instances that the reporter will use to send metrics
* @param globalTags A [[Map]] of tags to be used throughout the [[MetricReporter]].
* @param globalTags A map of tags to be used throughout the [[MetricReporter]].
* @param filters Tells the [[MetricReporter]] how to filter its Metrics before handing off to a Sender.
* @param includeHostInGlobalTags Whether to include the Host in the global tags.
*/
Expand Down
Expand Up @@ -36,7 +36,7 @@ abstract class ColossusSpec(_system: ActorSystem)

/**
* Convenience function for using an IOSystem. This will create an IOSystem, and ensure its shutdown.
* @param f The function to take the [[IOSystem]]
* @param f The function to take the I/O system
*/
def withIOSystem(f: IOSystem => Any) {
val sys = IOSystem("test-system-" + System.currentTimeMillis.toString, Some(2), MetricSystem.deadSystem)
Expand All @@ -49,7 +49,7 @@ abstract class ColossusSpec(_system: ActorSystem)

/**
* Shuts down the IOSystem, and ensures all Servers have been terminated.
* @param sys The [[IOSystem]] to shut down.
* @param sys The I/O system to shut down.
*/
def shutdownIOSystem(sys: IOSystem) {
implicit val ec = mySystem.dispatcher
Expand Down Expand Up @@ -90,10 +90,10 @@ abstract class ColossusSpec(_system: ActorSystem)
}

/**
* Convenience function for createing an IOSystem and Server, based on the Delegator factory passed in. By default the
* created server will be listening on [[TEST_PORT]], and will have all of the default values listed in [[colossus.core.ServerSettings]]
* Convenience function for creating an IOSystem and Server, based on the Delegator factory passed in. By default the
* created server will be listening on `TEST_PORT`, and will have all of the default values listed in `ServerSettings`
* @param factory The factory to create Delegators
* @param customSettings An custom settings which will override the defaults found in [[colossus.core.ServerSettings]]
* @param customSettings An custom settings which will override the defaults found in `ServerSettings`
* @param waitTime Amount of time to wait for the Server to be ready
* @param f The function which runs tests.
* @return
Expand Down
4 changes: 2 additions & 2 deletions colossus/src/main/scala/colossus/core/DataBuffer.scala
Expand Up @@ -65,7 +65,7 @@ case class DataBuffer(data: ByteBuffer) extends Encoder {
* @param buffer the array to copy into
* @param offset the first index of buffer to start writing to
* @param length how many bytes to write
* @throws ArrayOutOfBoundsException if target array is too small or buffer doesn't have sufficient bytes available
* @throws IndexOutOfBoundsException if target array is too small or buffer doesn't have sufficient bytes available
*/
def takeInto(buffer: Array[Byte], offset: Int, length: Int) {
if (length > remaining) {
Expand All @@ -83,7 +83,7 @@ case class DataBuffer(data: ByteBuffer) extends Encoder {
* @param n the number of bytes to skip.
* @throws IllegalArgumentException if n is larger than the number of remaining bytes
*/
def skip(n: Int) {
def skip(n: Int) = {
data.position(data.position() + n)
}

Expand Down
6 changes: 3 additions & 3 deletions colossus/src/main/scala/colossus/core/RetryPolicy.scala
Expand Up @@ -72,7 +72,7 @@ case class IncidentReport(totalTime: FiniteDuration, totalAttempts: Int)
* [[colossus.service.ServiceClient]] fails to connect to its target host, it
* will create a new `RetryIncident` from it's given [[RetryPolicy]].
*
* On each successive failure of the operation, a call to [[nextAttempt()]]
* On each successive failure of the operation, a call to `nextAttempt()`
* should be made that will return a `RetryAttempt` indicating what action
* should be taken. A single `RetryIncident` cannot be reused should be
* discarded when either the operation completes or gives up
Expand Down Expand Up @@ -186,7 +186,7 @@ object BackoffMultiplier {
*
* @param baseBackoff The base value to use for backing off. This may be used by the [[multiplier]]
* @param multiplier The multiplier that will be applied to the [[baseBackoff]]
* @param maxTime The maximim amount of time to allow for retrying
* @param maxTime The maximum amount of time to allow for retrying
* @param maxTries The maximum number of attempts to make
* @param immediateFirstAttempt Whether the first retry attempt should be immediate or use the given backoff and multiplier
*/
Expand Down Expand Up @@ -249,7 +249,7 @@ case object NoRetry extends RetryPolicy with RetryIncident {
* for some operation to complete, and if/how to retry the operation if it fails
* to complete within the waiting time.
*
* For example, a WaitPolicy is used by [[colossus.core.Server]] to determine
* For example, a WaitPolicy is used by `Server` to determine
* how long to wait for it's delegators to start up and how to respond if they
* fail
*
Expand Down
4 changes: 2 additions & 2 deletions colossus/src/main/scala/colossus/core/ServerRef.scala
Expand Up @@ -46,9 +46,9 @@ case class ServerRef private[colossus] (config: ServerConfig,
}

/**
* Broadcast a message to a all of the [[Initializer]]s of this server.
* Broadcast a message to a all of the [[colossus.core.server.Initializer]]s of this server.
*
* @param message Message to broadcast to the server's [[Initializer]]s
* @param message Message to broadcast to the server's [[colossus.core.server.Initializer]]s
* @param sender Reference to the Actor who sent the message
* @return
*/
Expand Down
2 changes: 1 addition & 1 deletion colossus/src/main/scala/colossus/core/ServerSettings.scala
Expand Up @@ -33,7 +33,7 @@ import scala.concurrent.duration._
* @param delegatorCreationPolicy A [[colossus.core.WaitPolicy]] describing how
* to handle delegator startup. Since a Server waits for a signal from the
* [[colossus.IOSystem]] that every worker has properly initialized a
* [[colossus.core.Initializer]], this determines how long to wait before the
* [[colossus.core.server.Initializer]], this determines how long to wait before the
* initialization is considered a failure and whether to retry the
* initialization.
*
Expand Down
8 changes: 4 additions & 4 deletions colossus/src/main/scala/colossus/core/server/ServerDSL.scala
Expand Up @@ -7,10 +7,10 @@ import com.typesafe.config.{Config, ConfigFactory}

/**
* An `Initializer` is used to perform any setup/coordination logic for a
* [[Server!]] inside a [[WorkerRef Worker]]. Initializers are also used to provide new
* `Server` inside a `Worker`. Initializers are also used to provide new
* connections from the server with connection handlers. An initializer is
* created per worker, so all actions on a single Initializer are
* single-threaded. See [[colossus.core.server.Server]] to see how `Initializer` is
* single-threaded. See `Server` to see how `Initializer` is
* used when starting servers.
*/
abstract class Initializer(context: InitContext) {
Expand All @@ -20,14 +20,14 @@ abstract class Initializer(context: InitContext) {
val server = context.server

/**
* Given a [[ServerContext]] for a new connection, provide a new connection
* Given a [[colossus.core.ServerContext]] for a new connection, provide a new connection
* handler for the connection
*/
def onConnect: ServerContext => ServerConnectionHandler

/**
* Message receive hook. This is used to handle any messages that are sent
* using [[ServerRef]] `initializerBroadcast`.
* using [[colossus.core.ServerRef]] `initializerBroadcast`.
*/
def receive: Receive = Map() //empty receive

Expand Down
2 changes: 1 addition & 1 deletion colossus/src/main/scala/colossus/service/Callback.scala
Expand Up @@ -305,7 +305,7 @@ case class ConstantCallback[O](value: Try[O]) extends Callback[O] {
* A `CallbackExecutor` represents a scheduler and execution environment for
* [[Callback]]s and is required when either converting a `Future` to a
* `Callback` or scheduling delayed execution of a `Callback`. Every
* [[colossus.core.Worker Worker]] provides an `CallbackExecutor` that can be
* `Worker` provides an `CallbackExecutor` that can be
* imported when doing such operations.
*
*/
Expand Down
4 changes: 2 additions & 2 deletions colossus/src/main/scala/colossus/service/ServiceClient.scala
Expand Up @@ -48,10 +48,10 @@ case class ClientConfig(
object ClientConfig {

/**
* Load a ClientConfig definition from a Config. Looks into `colossus.clients.$clientName` and falls back onto
* Load a ClientConfig definition from a Config. Looks into `colossus.clients.clientName` and falls back onto
* `colossus.client-defaults`
* @param clientName The name of the client definition to load
* @param config A config object which contains at the least a `colossus.clients.$clientName` and a `colossus.client-defaults`
* @param config A config object which contains at the least a `colossus.clients.clientName` and a `colossus.client-defaults`
* @return
*/
def load(clientName: String, config: Config = ConfigFactory.load()): ClientConfig = {
Expand Down
6 changes: 3 additions & 3 deletions colossus/src/main/scala/colossus/service/ServiceDSL.scala
Expand Up @@ -10,7 +10,7 @@ import java.net.InetSocketAddress
import akka.actor.Actor.Receive
import colossus.IOSystem
import colossus.controller.{Codec, Controller, Encoding}
import colossus.core.server.{Initializer, Server, ServerDSL}
import colossus.core.server.{Initializer, Server}
import colossus.core._
import colossus.metrics.MetricAddress

Expand Down Expand Up @@ -194,10 +194,10 @@ trait ClientFactory[P <: Protocol, M[_], +T <: Sender[P, M], E] {
protected lazy val configDefaults = ConfigFactory.load()

/**
* Load a ServiceClient definition from a Config. Looks into `colossus.clients.$clientName` and falls back onto
* Load a ServiceClient definition from a Config. Looks into `colossus.clients.clientName` and falls back onto
* `colossus.client-defaults`
* @param clientName The name of the client definition to load
* @param config A config object which contains at the least a `colossus.clients.$clientName` and a `colossus.client-defaults`
* @param config A config object which contains at the least a `colossus.clients.clientName` and a `colossus.client-defaults`
* @return
*/
def apply(clientName: String, config: Config = configDefaults)(implicit env: E): T = {
Expand Down
Expand Up @@ -19,7 +19,7 @@ case class SubSink[K, T](id: K, stream: Sink[T])
* that source are routed into the base sink.
*
* Likewise, demultiplexing a multiplexed `Source[T]` will create a
* `Source[SubSource[K,T]]`, with each [[Subsource]] being one of the
* `Source[SubSource[K,T]]`, with each [[SubSource]] being one of the
* sub-streams being fed into the multiplexed source.
*/
object Multiplexing {
Expand Down Expand Up @@ -76,7 +76,7 @@ object Multiplexing {

/**
* Demultiplex a multiplexed stream into individual sub-streams. An implicit
* [[Multistream[K,T] Multistream]] is required in order to determine the
* [[MultiStream]] is required in order to determine the
* proper substream of each message in the multiplexed stream.
*
* @param base The multiplexed source
Expand Down

0 comments on commit f58d9c0

Please sign in to comment.