void updateIndex(Transaction tx, KahaRemoveDestinationCommand command, Location location) throws IOException { StoredDestination sd = getStoredDestination(command.getDestination(), tx); sd.orderIndex.remove(tx); sd.locationIndex.clear(tx); sd.locationIndex.unload(tx); tx.free(sd.locationIndex.getPageId()); sd.messageIdIndex.clear(tx); sd.messageIdIndex.unload(tx); tx.free(sd.messageIdIndex.getPageId()); if (sd.subscriptions != null) { sd.subscriptions.clear(tx); sd.subscriptions.unload(tx); tx.free(sd.subscriptions.getPageId()); sd.subscriptionAcks.clear(tx); sd.subscriptionAcks.unload(tx); tx.free(sd.subscriptionAcks.getPageId()); sd.ackPositions.clear(tx); sd.ackPositions.unload(tx); tx.free(sd.ackPositions.getHeadPageId()); sd.subLocations.clear(tx); sd.subLocations.unload(tx); tx.free(sd.subLocations.getHeadPageId()); } String key = key(command.getDestination()); storedDestinations.remove(key); metadata.destinations.remove(tx, key); clearStoreStats(command.getDestination()); storeCache.remove(key(command.getDestination())); }
void updateIndex(Transaction tx, KahaRemoveDestinationCommand command, Location location) throws IOException { StoredDestination sd = getStoredDestination(command.getDestination(), tx); sd.orderIndex.remove(tx); sd.locationIndex.clear(tx); sd.locationIndex.unload(tx); tx.free(sd.locationIndex.getPageId()); sd.messageIdIndex.clear(tx); sd.messageIdIndex.unload(tx); tx.free(sd.messageIdIndex.getPageId()); if (sd.subscriptions != null) { sd.subscriptions.clear(tx); sd.subscriptions.unload(tx); tx.free(sd.subscriptions.getPageId()); sd.subscriptionAcks.clear(tx); sd.subscriptionAcks.unload(tx); tx.free(sd.subscriptionAcks.getPageId()); sd.ackPositions.clear(tx); sd.ackPositions.unload(tx); tx.free(sd.ackPositions.getHeadPageId()); sd.subLocations.clear(tx); sd.subLocations.unload(tx); tx.free(sd.subLocations.getHeadPageId()); } String key = key(command.getDestination()); storedDestinations.remove(key); metadata.destinations.remove(tx, key); clearStoreStats(command.getDestination()); storeCache.remove(key(command.getDestination())); }
void updateIndex(Transaction tx, KahaRemoveDestinationCommand command, Location location) throws IOException { StoredDestination sd = getStoredDestination(command.getDestination(), tx); sd.orderIndex.remove(tx); sd.locationIndex.clear(tx); sd.locationIndex.unload(tx); tx.free(sd.locationIndex.getPageId()); sd.messageIdIndex.clear(tx); sd.messageIdIndex.unload(tx); tx.free(sd.messageIdIndex.getPageId()); if (sd.subscriptions != null) { sd.subscriptions.clear(tx); sd.subscriptions.unload(tx); tx.free(sd.subscriptions.getPageId()); sd.subscriptionAcks.clear(tx); sd.subscriptionAcks.unload(tx); tx.free(sd.subscriptionAcks.getPageId()); sd.ackPositions.clear(tx); sd.ackPositions.unload(tx); tx.free(sd.ackPositions.getHeadPageId()); sd.subLocations.clear(tx); sd.subLocations.unload(tx); tx.free(sd.subLocations.getHeadPageId()); } String key = key(command.getDestination()); storedDestinations.remove(key); metadata.destinations.remove(tx, key); clearStoreStats(command.getDestination()); storeCache.remove(key(command.getDestination())); }