public void compact ( ServerStoreProxy . ChainEntry entry ) { ChainBuilder builder = new ChainBuilder ( ) ; for ( PutOperation < K , V > operation : resolveAll ( entry ) . values ( ) ) { builder = builder . add ( codec . encode ( operation ) ) ; } Chain compacted = builder . build ( ) ; if ( compacted . length ( ) < entry . length ( ) ) { entry . replaceAtHead ( compacted ) ; } }
Compacts the given chain entry by resolving every key within .