If you think the Android project Jello listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.atteo.jello.space;
//www.java2s.comimport com.atteo.jello.Record;
import com.atteo.jello.store.ListPage;
import com.atteo.jello.store.PagedFile;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
@Singleton
publicclass Hybrid implements SpaceManagerPolicy {
static {
System.loadLibrary("Hybrid");
}
@Inject
public Hybrid(
final PagedFile pagedFile,
final ListPage listPage,
@Named("pageSize") finalshort pageSize,
@Named("blockSize") finalshort blockSize,
@Named("maxRecordSize") finalint maxRecordSize,
@Named("freeSpaceInfosPerPage") finalshort freeSpaceInfosPerPage,
@Named("freeSpaceInfoSize") finalshort freeSpaceInfoSize,
@Named("freeSpaceInfoPageCapacity") finalshort freeSpaceInfoPageCapacity,
@Named("freeSpaceInfoPageId") finalint pageFreeSpaceInfo,
@Named("nextFitHistogramClasses") finalint histogramClasses) {
init(pagedFile, listPage, pageSize, blockSize, maxRecordSize,
freeSpaceInfosPerPage, freeSpaceInfoSize,
freeSpaceInfoPageCapacity, pageFreeSpaceInfo, histogramClasses);
}
publicnativeint acquirePage();
publicnativeboolean acquireRecord(Record record, int length);
publicnativevoid commit();
publicnativevoid create();
publicnativeboolean isPageUsed(int id);
publicnativeboolean load();
publicnativeboolean reacquireRecord(Record record, int length);
publicnativevoid releasePage(int id);
publicnativevoid releaseRecord(Record record);
publicnativevoid setPageUsed(int id, boolean used);
privatenativevoid init(PagedFile pagedFile, ListPage listPage,
short pageSize, short blockSize, int maxRecordSize,
short freeSpaceInfosPerPage, short freeSpaceInfoSize,
short freeSpaceInfoPageCapacity, int pageFreeSpaceInfo,
int histogramClasses);
}