mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-13 14:48:54 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
29 lines
804 B
Java
29 lines
804 B
Java
package com.twitter.search.earlybird.common;
|
|
|
|
import javax.inject.Inject;
|
|
import javax.inject.Singleton;
|
|
|
|
import org.apache.thrift.protocol.TProtocolFactory;
|
|
|
|
import com.twitter.finagle.Service;
|
|
import com.twitter.search.common.util.thrift.ThriftToBytesFilter;
|
|
import com.twitter.search.earlybird.thrift.EarlybirdService;
|
|
|
|
@Singleton
|
|
public class EarlybirdThriftBackend extends EarlybirdService.ServiceToClient {
|
|
|
|
/**
|
|
* Wrapping the bytes svc back to a EarlybirdService.ServiceToClient, which
|
|
* is a EarlybirdService.ServiceIface again.
|
|
*/
|
|
@Inject
|
|
public EarlybirdThriftBackend(
|
|
ThriftToBytesFilter thriftToBytesFilter,
|
|
Service<byte[], byte[]> byteService,
|
|
TProtocolFactory protocolFactory) {
|
|
|
|
super(thriftToBytesFilter.andThen(byteService), protocolFactory);
|
|
}
|
|
|
|
}
|