@ Override public List < MessageHistory > getKeyHistory ( String key , Long startTime , Long endTime , int count ) throws MessageQueueException { List < MessageHistory > list = Lists . newArrayList ( ) ; ColumnList < UUID > columns ; try { columns = keyspace . prepareQuery ( historyColumnFamily ) . setConsistencyLevel ( consistencyLevel ) . getRow ( key ) . execute ( ) . getResult ( ) ; } catch ( ConnectionException e ) { throw new MessageQueueException ( "Failed to load history for " + key , e ) ; } for ( Column < UUID > column : columns ) { try { list . add ( deserializeString ( column . getStringValue ( ) , MessageHistory . class ) ) ; } catch ( Exception e ) { LOG . info ( "Error deserializing history entry" , e ) ; } } return list ; }
Return history for a single key for the specified time range