use of org.mule.runtime.core.internal.util.store.PersistentObjectStorePartition in project mule by mulesoft.
the class PartitionedPersistentObjectStore method createPartition.
private void createPartition(String partitionName) throws ObjectStoreException {
PersistentObjectStorePartition persistentObjectStorePartition = new PersistentObjectStorePartition(muleContext, partitionName, getNewPartitionDirectory());
persistentObjectStorePartition.open();
partitionsByName.put(partitionName, persistentObjectStorePartition);
}
use of org.mule.runtime.core.internal.util.store.PersistentObjectStorePartition in project mule by mulesoft.
the class PartitionedPersistentObjectStore method loadPreviousStoredPartitions.
private void loadPreviousStoredPartitions() throws ObjectStoreException {
File[] directories = storeDirectory.listFiles(File::isDirectory);
if (directories == null) {
return;
}
for (File partitionDirectory : directories) {
try {
PersistentObjectStorePartition persistentObjectStorePartition = new PersistentObjectStorePartition(muleContext, partitionDirectory);
persistentObjectStorePartition.open();
partitionsByName.put(persistentObjectStorePartition.getPartitionName(), persistentObjectStorePartition);
} catch (Exception e) {
LOGGER.error("Could not restore partition under directory " + partitionDirectory.getAbsolutePath());
}
}
}
Aggregations