synchronized void complete ( PageWrapper page ) { Preconditions . checkArgument ( this . pageByOffset . containsKey ( page . getOffset ( ) ) , "Given page is not registered." ) ; Preconditions . checkArgument ( this . incompleteNewPageOffset == PagePointer . NO_OFFSET || this . incompleteNewPageOffset == page . getOffset ( ) , "Not expecting this page to be completed." ) ; this . incompleteNewPageOffset = PagePointer . NO_OFFSET ; long pageOffset = this . indexLength ; this . indexLength += page . getPage ( ) . getLength ( ) ; this . pageByOffset . remove ( page . getOffset ( ) ) ; page . setOffset ( pageOffset ) ; this . pageByOffset . put ( page . getOffset ( ) , page ) ; }
Indicates that any modifications to the given PageWrapper have completed .