Class StableStore
java.lang.Object
com.swiftmq.impl.store.standard.cache.StableStore
-
Field Summary
Modifier and TypeFieldDescriptionprotected StoreContext
protected byte[]
protected RandomAccessFile
protected long
protected String
static final String
protected PriorityQueue<Integer>
protected int
protected final AtomicInteger
protected final AtomicInteger
protected String
-
Constructor Summary
ConstructorDescriptionStableStore
(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 TypeMethodDescriptionvoid
void
void
close()
void
static void
copyToNewSize
(String sourceFilename, String destFilename, int oldSize, int newSize) protected Page
create()
createPage
(int pageNo) void
void
ensure
(int pageNo) protected void
ensurePage
(int pageNo) void
get
(int pageNo) int
getnFree()
int
boolean
protected Page
loadPage
(int pageNo) void
void
void
reset()
void
setCheckPointActive
(boolean checkPointActive) void
setFreePoolEnabled
(boolean freePoolEnabled) void
setNumberPages
(int numberPages) void
shrink()
void
void
sync()
toString()
void
truncateToPage
(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
-