Skip to content

Commit

Permalink
finagle-thrift: Deprecate ThriftClientFramedCodec{Factory}
Browse files Browse the repository at this point in the history
Problem

ThriftClientFramedCodecFactory is netty3 specific and hinders migration
to netty4.

Solution

Migrate the last usage to the StackClient. This also completes the removal
of internal usages of ThriftClientFramedCodec{Factory} and we can now
deprecate them.

RB_ID=894709
  • Loading branch information
Bryce Anderson authored and jenkins committed Dec 8, 2016
1 parent 29f2e92 commit 05ca0ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -14,18 +14,22 @@ import org.jboss.netty.channel._
* supports upgrading in order to provide TraceContexts across
* requests.
*/
@deprecated("Use the com.twitter.finagle.Thrift object to build a client", "2016-12-01")
object ThriftClientFramedCodec {
/**
* Create a [[com.twitter.finagle.thrift.ThriftClientFramedCodecFactory]].
* Passing a ClientId will propagate that information to the server iff the server is a finagle
* server.
*/
@deprecated("Use the com.twitter.finagle.Thrift object to build a client", "2016-12-01")
def apply(clientId: Option[ClientId] = None): ThriftClientFramedCodecFactory =
new ThriftClientFramedCodecFactory(clientId)

@deprecated("Use Thrift.client to configure the thrift framed protocol", "2016-12-01")
def get(): ThriftClientFramedCodecFactory = apply()
}

@deprecated("Use the com.twitter.finagle.Thrift object to build a client", "2016-12-01")
class ThriftClientFramedCodec(
protocolFactory: TProtocolFactory,
config: ClientCodecConfig,
Expand Down
Expand Up @@ -3,6 +3,7 @@ package com.twitter.finagle.thrift
import com.twitter.finagle.{ClientCodecConfig, CodecFactory}
import org.apache.thrift.protocol.TProtocolFactory

@deprecated("Use the com.twitter.finagle.Thrift object to build a client", "2016-12-01")
class ThriftClientFramedCodecFactory(
clientId: Option[ClientId],
_useCallerSeqIds: Boolean,
Expand Down

0 comments on commit 05ca0ea

Please sign in to comment.