long getSequenceSize ( SegmentKelp segment ) { int tailPid = _tailPid . get ( ) ; long size = 0 ; for ( int i = 0 ; i <= tailPid ; i ++ ) { Page page = _pages . get ( i ) ; if ( page != null && page . getSegment ( ) == segment ) { size += page . size ( ) ; } } return size ; }
Returns the size in bytes of all pages with the given sequence .