@ InService ( PageServiceImpl . class ) static PageLeafImpl readCheckpointFull ( TableKelp table , PageServiceImpl pageActor , InputStream is , int pid , int nextPid , long sequence ) throws IOException { byte [ ] minKey = new byte [ table . getKeyLength ( ) ] ; byte [ ] maxKey = new byte [ table . getKeyLength ( ) ] ; int count = 0 ; BlockLeaf [ ] blocks ; IoUtil . readAll ( is , minKey , 0 , minKey . length ) ; IoUtil . readAll ( is , maxKey , 0 , maxKey . length ) ; count = BitsUtil . readInt16 ( is ) ; blocks = new BlockLeaf [ count ] ; for ( int i = 0 ; i < count ; i ++ ) { blocks [ i ] = new BlockLeaf ( pid ) ; blocks [ i ] . readCheckpointFull ( is ) ; } if ( count == 0 ) { blocks = new BlockLeaf [ ] { new BlockLeaf ( pid ) } ; } PageLeafImpl page = new PageLeafImpl ( pid , nextPid , sequence , table , minKey , maxKey , blocks ) ; page . clearDirty ( ) ; page . validate ( table ) ; page . toSorted ( table ) ; return page ; }
Reads a full checkpoint entry into the page .