Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TSet


   * calling this method again.
   */
  @Override
  public TSet readSetBegin() throws TException {
    stackLevel++;
    set = new TSet(ORDERED_TYPE, readI32());
    if (set.size == 0 && lastPrimitiveWasNull()) {
      return null;
    }
    return set;
  }
View Full Code Here


  }

  @Override
  public TSet readSetBegin() throws TException {
    assert (!inner);
    TSet set = new TSet();
    if (columns[index] == null || columns[index].equals(nullString)) {
      index++;
      if (returnNulls) {
        return null;
      }
    } else if (columns[index].isEmpty()) {
      index++;
    } else {
      fields = secondaryPattern.split(columns[index++]);
      set = new TSet(ORDERED_TYPE, fields.length);
    }
    inner = true;
    innerIndex = 0;
    return set;
  }
View Full Code Here

    }

    public <E> Set<E> readSet(ThriftCodec<E> elementCodec)
            throws Exception
    {
        TSet tSet = protocol.readSetBegin();
        Set<E> set = new HashSet<>();
        for (int i = 0; i < tSet.size; i++) {
            E element = elementCodec.read(protocol);
            set.add(element);
        }
View Full Code Here

    {
        if (set == null) {
            return;
        }

        protocol.writeSetBegin(new TSet(elementCodec.getType().getProtocolType().getType(), set.size()));

        for (T element : set) {
            elementCodec.write(element, protocol);
        }
View Full Code Here

    wrapped.readListEnd();
  }

  @Override
  public TSet readSetBegin() throws TException {
    TSet set = wrapped.readSetBegin();
    checkContainerElemType(set.elemType);
    return set;
  }
View Full Code Here

    return list;
  }

  @Override
  public TSet readSetBegin() throws TException {
    TSet set = super.readSetBegin();
    checkContainerElemType(set.elemType);
    return set;
  }
View Full Code Here

TOP

Related Classes of org.apache.thrift.protocol.TSet

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.