public ByteBuffer readData ( ) throws Exception { ColumnList < C > result = keyspace . prepareQuery ( columnFamily ) . setConsistencyLevel ( consistencyLevel ) . getKey ( key ) . execute ( ) . getResult ( ) ; boolean hasColumn = false ; ByteBuffer data = null ; for ( Column < C > column : result ) { if ( column . getTtl ( ) == 0 ) { if ( hasColumn ) { throw new IllegalStateException ( "Row has multiple uniquneness locks" ) ; } hasColumn = true ; data = column . getByteBufferValue ( ) ; } } if ( ! hasColumn ) { throw new NotFoundException ( this . key . toString ( ) + " has no uniquness lock" ) ; } return data ; }
Read the data stored with the unique row . This data is normally a foreign key to another column family .