Class UnlimitedPageSource
- java.lang.Object
-
- org.terracotta.offheapstore.paging.UnlimitedPageSource
-
- All Implemented Interfaces:
PageSource
public class UnlimitedPageSource extends java.lang.Object implements PageSource
-
-
Field Summary
Fields Modifier and Type Field Description private BufferSourcesource
-
Constructor Summary
Constructors Constructor Description UnlimitedPageSource(BufferSource source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pageallocate(int size, boolean thief, boolean victim, OffHeapStorageArea owner)Attempt to allocate a page of the given size.voidfree(Page page)
-
-
-
Field Detail
-
source
private final BufferSource source
-
-
Constructor Detail
-
UnlimitedPageSource
public UnlimitedPageSource(BufferSource source)
-
-
Method Detail
-
allocate
public Page allocate(int size, boolean thief, boolean victim, OffHeapStorageArea owner)
Description copied from interface:PageSourceAttempt to allocate a page of the given size.Allocations identified as thieves will if necessary 'steal' space from previous allocations identified as 'victims' in order to fulfill the allocation request.
owneris the area from which the returned page can subsequently be stolen or recovered. This is most likely to be the calling instance.- Specified by:
allocatein interfacePageSource- Parameters:
size- size of page to allocatethief-trueif the allocation can steal space from victimsvictim-trueif the allocated page should be eligible for stealingowner- owner from which subsequent steal should occur- Returns:
- an allocated page, or
nullin the case of failure
-
free
public void free(Page page)
- Specified by:
freein interfacePageSource
-
-