The implementation will take care of details such as PageSize.
The producers will write directly to PagingStore and that will decide what Page file should be used based on configured size
1398139914001401140214031404140514061407140814091410
} } public void requestProducerCredits(final SimpleString address, final int credits) throws Exception { PagingStore store = server.getPagingManager().getPageStore(address); if (!store.checkMemory(new Runnable() { public void run() { callback.sendProducerCreditsMessage(credits, address); }
548549550551552553554555556
{ for (Entry<SimpleString, Collection<Integer>> entry : pageFilesToSync.entrySet()) { if (!started) return; PagingStore store = manager.getPageStore(entry.getKey()); store.sendPages(replicator, entry.getValue()); } }
564565566567568569570571572573574
throws Exception { Map<SimpleString, Collection<Integer>> info = new HashMap<SimpleString, Collection<Integer>>(); for (SimpleString storeName : pagingManager.getStoreNames()) { PagingStore store = pagingManager.getPageStore(storeName); info.put(storeName, store.getCurrentIds()); store.forceAnotherPage(); } return info; }
200320042005200620072008200920102011201220132014
QueueBindingInfo queueInfo = queueInfos.get(queueID); if (queueInfo != null) { SimpleString address = queueInfo.getAddress(); PagingStore store = pagingManager.getPageStore(address); subs = store.getCursorProvider().getSubscription(queueID); pageSubscriptions.put(queueID, subs); } } return subs;
249250251252253254255256257258259260261
public int getNumberOfPages() throws Exception { clearIO(); try { PagingStore pageStore = pagingManager.getPageStore(address); if (!pageStore.isPaging()) { return 0; } else {
1384138513861387138813891390139113921393139413951396
930931932933934935936937938
private void setPagingStore(final ServerMessage message) throws Exception { PagingStore store = pagingManager.getPageStore(message.getAddress()); message.setPagingStore(store); }
984985986987988989990991992993994
Transaction tx = context.getTransaction(); for (Map.Entry<SimpleString, RouteContextList> entry : context.getContexListing().entrySet()) { PagingStore store = pagingManager.getPageStore(entry.getKey()); if (storageManager.addToPage(store, message, context.getTransaction(), entry.getValue())) { if (message.isLargeMessage()) {
128112821283128412851286128712881289129012911292129312941295
session.commit(); session.commit(); PagingStore store = server.getPagingManager().getPageStore(ADDRESS); store.getCursorProvier().cleanup(); long timeout = System.currentTimeMillis() + 5000; while (store.isPaging() && timeout > System.currentTimeMillis()) { Thread.sleep(100); } // It's async, so need to wait a bit for it happening
3537353835393540354135423543354435453546354735483549
OperationContextImpl.setContext(ctx); PagingManager paging = server.getPagingManager(); PagingStore store = paging.getPageStore(ADDRESS); store.sync(); assertTrue(pageUp.await(10, TimeUnit.SECONDS)); assertTrue(pageDone.await(10, TimeUnit.SECONDS));