- All Superinterfaces:
- All Known Subinterfaces:
- All Known Implementing Classes:
public interface Cacheable extends SerializableInterface that defines the necessary behavior for objects added to a Cache. Objects only need to know how big they are (in bytes). That size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.
While the accuracy of the size calculation is important, care should be taken to minimize the computation time so that cache operations are speedy.
- Jive Software
- See Also:
int getCachedSize() throws CannotCalculateSizeExceptionReturns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.
- the size of the Object in bytes.
CannotCalculateSizeException- if the size cannot be calculated