Example usage for org.apache.cassandra.db.rows RowIterator metadata

List of usage examples for org.apache.cassandra.db.rows RowIterator metadata

Introduction

In this page you can find the example usage for org.apache.cassandra.db.rows RowIterator metadata.

Prototype

public TableMetadata metadata();

Source Link

Document

The metadata for the table this iterator on.

Usage

From source file:com.stratio.cassandra.lucene.util.SimpleRowIterator.java

License:Apache License

/**
 * Builds a new {@link SimpleRowIterator} from the current position of the specified {@link RowIterator}. Any other
 * rows in the specified iterator won't be read.
 *
 * @param iterator the {@link Row} iterator
 *///  www.j  av a 2s.c  om
public SimpleRowIterator(RowIterator iterator) {
    this.metadata = iterator.metadata();
    this.key = iterator.partitionKey();
    this.columns = iterator.columns();
    this.staticRow = iterator.staticRow();
    this.row = iterator.next();
    this.rows = Collections.singletonList(row).iterator();
}