Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.commons.marshall;

Buffer size predictor

Author(s):
Galder ZamarreƱo
Since:
5.0
 
 public interface BufferSizePredictor {

   
Provide the next buffer size taking in account the object to store in the buffer.

Parameters:
obj instance that will be stored in the buffer
Returns:
int representing the next predicted buffer size
   int nextSize(Object obj);

   
Record the size of the of data in the last buffer used.

Parameters:
previousSize int representing the size of the last object buffered.
   void recordSize(int previousSize);
New to GrepCode? Check out our FAQ X