Class StableStore
java.lang.Object
com.swiftmq.impl.store.standard.cache.StableStore
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StoreContextprotected byte[]protected RandomAccessFileprotected longprotected Stringstatic final Stringprotected PriorityQueue<Integer>protected intprotected final AtomicIntegerprotected final AtomicIntegerprotected String -
Constructor Summary
ConstructorsConstructorDescriptionStableStore(StoreContext ctx, String path, int initialPages) StableStore(StoreContext ctx, String path, int initialPages, boolean offline) StableStore(StoreContext ctx, String path, int initialPages, boolean offline, boolean freePoolEnabled) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidclose()voidstatic voidcopyToNewSize(String sourceFilename, String destFilename, int oldSize, int newSize) protected Pagecreate()createPage(int pageNo) voidvoidensure(int pageNo) protected voidensurePage(int pageNo) voidget(int pageNo) intgetnFree()intbooleanprotected PageloadPage(int pageNo) voidvoidvoidreset()voidsetCheckPointActive(boolean checkPointActive) voidsetFreePoolEnabled(boolean freePoolEnabled) voidsetNumberPages(int numberPages) voidshrink()voidvoidsync()toString()voidtruncateToPage(int pageNo) protected void
-
Field Details
-
FILENAME
- See Also:
-
ctx
-
path
-
freePages
-
nFree
-
file
-
filename
-
fileLength
protected volatile long fileLength -
numberPages
-
initialPages
protected int initialPages -
emptyData
protected byte[] emptyData
-
-
Constructor Details
-
StableStore
- Throws:
Exception
-
StableStore
public StableStore(StoreContext ctx, String path, int initialPages, boolean offline) throws Exception - Throws:
Exception
-
StableStore
public StableStore(StoreContext ctx, String path, int initialPages, boolean offline, boolean freePoolEnabled) throws Exception - Throws:
Exception
-
-
Method Details
-
getnFree
public int getnFree() -
isCheckPointActive
public boolean isCheckPointActive() -
setCheckPointActive
public void setCheckPointActive(boolean checkPointActive) -
setFreePoolEnabled
public void setFreePoolEnabled(boolean freePoolEnabled) -
adminToolActivated
public void adminToolActivated() -
adminToolDeactivated
public void adminToolDeactivated() -
performTimeAction
public void performTimeAction() -
copyToNewSize
public static void copyToNewSize(String sourceFilename, String destFilename, int oldSize, int newSize) throws Exception - Throws:
Exception
-
setNumberPages
public void setNumberPages(int numberPages) -
createPage
-
ensurePage
- Throws:
Exception
-
sync
- Throws:
Exception
-
truncateToPage
- Throws:
Exception
-
loadPage
- Throws:
Exception
-
getNumberPages
public int getNumberPages() -
create
- Throws:
Exception
-
ensure
- Throws:
Exception
-
get
- Throws:
Exception
-
put
- Throws:
Exception
-
free
- Throws:
Exception
-
writePage
- Throws:
Exception
-
shrinkFile
- Throws:
Exception
-
shrink
- Throws:
Exception
-
deleteStore
- Throws:
Exception
-
copy
- Throws:
Exception
-
close
- Throws:
Exception
-
reset
- Throws:
Exception
-
toString
-