the-algorithm/src/java/com/twitter/search/earlybird/common/EarlybirdThriftBackend.java
twitter-team ef4c5eb65e Twitter Recommendation Algorithm
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.
2023-03-31 17:36:31 -05:00

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);
}
}