Skip to content

Commit

Permalink
finagle-core: Remove Deprecated ServerBuilder.stack Method
Browse files Browse the repository at this point in the history
Problem / Solution
The `ServerBuilder.stack` method which takes a function has
been deprecated for at least three years. It prevents the `ServerBuilder`
class from being structured in a similar fashion to `ClientBuilder` and
should be removed. This commit removes it.

JIRA Issues: CSL-7377

Differential Revision: https://phabricator.twitter.biz/D251975
  • Loading branch information
ryanoneill authored and jenkins committed Dec 12, 2018
1 parent 8d741a5 commit a05e5e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -41,6 +41,10 @@ Breaking API Changes
these methods within `TransportContext` should be changed to use the corresponding
methods on `c.t.f.t.Transport` instead. ``PHAB_ID=D244742``

* finagle-core: The deprecated `c.t.f.b.ServerBuilder.stack` method which takes a function
has been removed. Uses of this method should be changed to use the `c.t.f.b.ServerBuilder.stack`
method which takes a `c.t.f.s.StackBasedServer` instead. ``PHAB_ID=D251975``

* finagle-core: The deprecated `c.t.f.t.Transport.peerCertificate` method on the `Transport` class
(not the `Transport.peerCertificate` Finagle context) has been removed. Uses of this
method should be changed to use `c.t.f.t.TransportContext.peerCertificate` instead.
Expand Down
Expand Up @@ -227,22 +227,6 @@ class ServerBuilder[Req, Rep, HasCodec, HasBindTo, HasName] private[builder] (
def configured[P](paramAndStackParam: (P, Stack.Param[P])): This =
copy(params.+(paramAndStackParam._1)(paramAndStackParam._2), mk)

/**
* Overrides the stack and [[com.twitter.finagle.Server]] that will be used
* by this builder.
*
* @param mk A function that materializes a `Server` from a set of `Params`.
* `mk` is passed the state of configuration when `build` is called. There is
* no guarantee that all the builder parameters will be used by the server
* created by `mk`; it is up to the discretion of the server and protocol
* implementation.
*/
@deprecated("Use stack(server: StackBasedServer)", "7.0.0")
def stack[Req1, Rep1](
mk: Stack.Params => FinagleServer[Req1, Rep1]
): ServerBuilder[Req1, Rep1, Yes, HasBindTo, HasName] =
copy(params, mk)

/**
* Overrides the stack and [[com.twitter.finagle.Server]] that will be used
* by this builder.
Expand Down

0 comments on commit a05e5e7

Please sign in to comment.