|
|
|
@ -64,6 +64,9 @@ public class StreamInfo<K, V> {
|
|
|
|
|
StreamMessageId lastGeneratedId;
|
|
|
|
|
Entry<K, V> firstEntry;
|
|
|
|
|
Entry<K, V> lastEntry;
|
|
|
|
|
StreamMessageId maxDeletedEntryId;
|
|
|
|
|
int entriesAdded;
|
|
|
|
|
StreamMessageId recordedFirstEntryId;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns length of the stream
|
|
|
|
@ -149,4 +152,42 @@ public class StreamInfo<K, V> {
|
|
|
|
|
this.lastEntry = lastEntry;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the maximal entry ID that was deleted from the stream
|
|
|
|
|
*
|
|
|
|
|
* @return StreamMessageId object
|
|
|
|
|
*/
|
|
|
|
|
public StreamMessageId getMaxDeletedEntryId() {
|
|
|
|
|
return maxDeletedEntryId;
|
|
|
|
|
}
|
|
|
|
|
public StreamInfo<K, V> setMaxDeletedEntryId(StreamMessageId maxDeletedEntryId) {
|
|
|
|
|
this.maxDeletedEntryId = maxDeletedEntryId;
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the count of all entries added to the stream during its lifetime
|
|
|
|
|
*
|
|
|
|
|
* @return entries count
|
|
|
|
|
*/
|
|
|
|
|
public int getEntriesAdded() {
|
|
|
|
|
return entriesAdded;
|
|
|
|
|
}
|
|
|
|
|
public StreamInfo<K, V> setEntriesAdded(int entriesAdded) {
|
|
|
|
|
this.entriesAdded = entriesAdded;
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the first ID what was added to the stream
|
|
|
|
|
*
|
|
|
|
|
* @return StreamMessageId object
|
|
|
|
|
*/
|
|
|
|
|
public StreamMessageId getRecordedFirstEntryId() {
|
|
|
|
|
return recordedFirstEntryId;
|
|
|
|
|
}
|
|
|
|
|
public StreamInfo<K, V> setRecordedFirstEntryId(StreamMessageId recordedFirstEntryId) {
|
|
|
|
|
this.recordedFirstEntryId = recordedFirstEntryId;
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|