Package org.apache.thrift.transport

Examples of org.apache.thrift.transport.TMemoryInputTransport


    /**
     * Wrap the read buffer in a memory-based transport so a processor can read
     * the data it needs to handle an invocation.
     */
    private TTransport getInputTransport() {
      return inputTransportFactory_.getTransport(new TMemoryInputTransport(buffer_.array()));
    }
View Full Code Here


   * factory that is passed in.
   *
   * @param protocolFactory Factory to create a protocol
   */
  public TDeserializer(TProtocolFactory protocolFactory) {
    trans_ = new TMemoryInputTransport();
    protocol_ = protocolFactory.getProtocol(trans_);
  }
View Full Code Here

   * factory that is passed in.
   *
   * @param protocolFactory Factory to create a protocol
   */
  public TDeserializer(TProtocolFactory protocolFactory) {
    trans_ = new TMemoryInputTransport();
    protocol_ = protocolFactory.getProtocol(trans_);
  }
View Full Code Here

    {
        DocumentMetadata docMeta = new DocumentMetadata();

        byte[] decompressedData = CassandraUtils.decompress(ByteBufferUtil.getArray(data));

        TTransport trans = new TMemoryInputTransport(decompressedData);
        TProtocol deser = protocolFactory.getProtocol(trans);

        try
        {
            docMeta.read(deser);
View Full Code Here

 
  private Iterator<Entry<Key,Value>> scanner;
  private boolean printTimeStamps;
 
  public static RemoteSpan getRemoteSpan(Entry<Key,Value> entry) {
    TMemoryInputTransport transport = new TMemoryInputTransport(entry.getValue().get());
    TCompactProtocol protocol = new TCompactProtocol(transport);
    RemoteSpan span = new RemoteSpan();
    try {
      span.read(protocol);
    } catch (TException ex) {
View Full Code Here

 
  private Iterator<Entry<Key,Value>> scanner;
  private boolean printTimeStamps;
 
  public static RemoteSpan getRemoteSpan(Entry<Key,Value> entry) {
    TMemoryInputTransport transport = new TMemoryInputTransport(entry.getValue().get());
    TCompactProtocol protocol = new TCompactProtocol(transport);
    RemoteSpan span = new RemoteSpan();
    try {
      span.read(protocol);
    } catch (TException ex) {
View Full Code Here

    buf.read(serialized, 0, 100*1024);

    long startTime = System.currentTimeMillis();
    for (int i = 0; i < HOW_MANY; i++) {
      T o2 = klass.newInstance();
      o2.read(factory.getProtocol(new TMemoryInputTransport(serialized)));
    }
    long endTime = System.currentTimeMillis();

    System.out.println("Deserialization test time: " + (endTime - startTime) + " ms");
  }
View Full Code Here

    /**
     * Wrap the read buffer in a memory-based transport so a processor can read
     * the data it needs to handle an invocation.
     */
    private TTransport getInputTransport() {
      return new TMemoryInputTransport(buffer_.array());
    }
View Full Code Here

   * factory that is passed in.
   *
   * @param protocolFactory Factory to create a protocol
   */
  public TDeserializer(TProtocolFactory protocolFactory) {
    trans_ = new TMemoryInputTransport();
    protocol_ = protocolFactory.getProtocol(trans_);
  }
View Full Code Here

      trans_ = trans;
      selectionKey_ = selectionKey;
      selectThread_ = selectThread;
      buffer_ = ByteBuffer.allocate(4);

      frameTrans_ = new TMemoryInputTransport();
      response_ = new TByteArrayOutputStream();
      inTrans_ = inputTransportFactory_.getTransport(frameTrans_);
      outTrans_ = outputTransportFactory_.getTransport(new TIOStreamTransport(response_));
      inProt_ = inputProtocolFactory_.getProtocol(inTrans_);
      outProt_ = outputProtocolFactory_.getProtocol(outTrans_);
View Full Code Here

TOP

Related Classes of org.apache.thrift.transport.TMemoryInputTransport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.