Skip to content

Commit

Permalink
'#1864 Corrects class name (english)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdalla committed Feb 22, 2024
1 parent 1bd7230 commit 1a4c745
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import iped.app.timelinegraph.IpedChartsPanel;
import iped.app.timelinegraph.TimeEventGroup;
import iped.app.timelinegraph.cache.persistance.CachePersistance;
import iped.app.timelinegraph.cache.persistance.CachePersistence;
import iped.engine.core.Manager;
import iped.viewers.api.IMultiSearchResultProvider;

Expand Down Expand Up @@ -71,7 +71,7 @@ public void run() {
periodClassesToCache.add(ipedChartsPanel.getTimePeriodClass());
}
for (Class periodClasses : periodClassesToCache) {
CachePersistance cp = CachePersistance.getInstance();
CachePersistence cp = CachePersistence.getInstance();
try {
TimeIndexedMap c = cp.loadNewCache(teGroup, periodClasses);
if (c != null) {
Expand Down Expand Up @@ -111,7 +111,7 @@ public void run() {

if (Manager.getInstance() != null && Manager.getInstance().isProcessingFinished()) {
}
CachePersistance cp = CachePersistance.getInstance();
CachePersistence cp = CachePersistence.getInstance();
cp.saveNewCache(this);

cacheLoaders.clear();
Expand All @@ -135,7 +135,7 @@ public void run() {
}

} else {
CachePersistance cp = CachePersistance.getInstance();
CachePersistence cp = CachePersistence.getInstance();
for (Class periodClasses : periodClassesToCache) {
newCache.setIndexFile(teGroup, periodClasses.getSimpleName(), cp.getBaseDir());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import org.apache.logging.log4j.Logger;
import org.jfree.data.time.TimePeriod;

import iped.app.timelinegraph.cache.persistance.CachePersistance;
import iped.app.timelinegraph.cache.persistance.CachePersistance.CacheFileIterator;
import iped.app.timelinegraph.cache.persistance.CachePersistence;
import iped.app.timelinegraph.cache.persistance.CachePersistence.CacheFileIterator;
import iped.app.timelinegraph.datasets.IpedTimelineDatasetManager;

public class PersistedArrayList implements Set<CacheTimePeriodEntry> {
Expand Down Expand Up @@ -176,7 +176,7 @@ private void flush() {

final int lflushCount = flushCount++;

CachePersistance cp = CachePersistance.getInstance();
CachePersistence cp = CachePersistence.getInstance();
Future f = cp.cachePersistanceExecutor.submit(new Runnable() {
@Override
public void run() {
Expand All @@ -201,7 +201,7 @@ public void run() {
}

public void removeFlushes() {
CachePersistance.getInstance().cachePersistanceExecutor.execute(new Runnable() {
CachePersistence.getInstance().cachePersistanceExecutor.execute(new Runnable() {
@Override
public void run() {
for (File f : flushFiles) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.apache.pdfbox.io.RandomAccessBufferedFileInputStream;

import iped.app.timelinegraph.TimeEventGroup;
import iped.app.timelinegraph.cache.persistance.CachePersistance;
import iped.app.timelinegraph.cache.persistance.CachePersistence;

/**
* @author Patrick Dalla Bernardina
Expand Down Expand Up @@ -171,7 +171,7 @@ class ResultIterator implements Iterator<CacheTimePeriodEntry> {
private String className;
boolean useCache = false;
private TimelineCache timelineCache;
CachePersistance cp = CachePersistance.getInstance();
CachePersistence cp = CachePersistence.getInstance();
int countRead = 0;// counters to log number of cache reads
int countCache = 0;// counters to log number of disk reads
private Reference<CacheTimePeriodEntry>[] lsoftcache;// soft reference cache (a more complete cache but with SoftReferences)
Expand Down Expand Up @@ -271,7 +271,7 @@ public CacheTimePeriodEntry next() {
};

public void createOrLoadUpperPeriodIndex(IndexTimeStampCache indexTimeStampCache) {
CachePersistance cp = CachePersistance.getInstance();
CachePersistence cp = CachePersistence.getInstance();
if (upperPeriodIndex.size() == 0) {
TimelineCache timelineCache = TimelineCache.get(indexTimeStampCache.getTimeEventGroup());
for (Iterator iterator = indexTimeStampCache.getPeriodClassesToCache().iterator(); iterator.hasNext();) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
import iped.utils.IOUtil;

/*
* Class implementing method for timeline chart cache persistance
* Class implementing method for timeline chart cache persistence
*/

public class CachePersistance {
public class CachePersistence {
File baseDir;

HashMap<String, String> pathsToCheck = new HashMap<String, String>();
Expand All @@ -60,17 +60,17 @@ public class CachePersistance {

static private boolean bitstreamSerializeAsDefault = true;

static CachePersistance singleton = new CachePersistance();
static CachePersistence singleton = new CachePersistence();

static final String TIMECACHE_BASE_FOLDER = "timecachegroups";

public static CachePersistance getInstance() {
public static CachePersistence getInstance() {
return singleton;
}

static public ExecutorService cachePersistanceExecutor = Executors.newFixedThreadPool(1);

public CachePersistance() {
public CachePersistence() {
File startDir;
if (App.get().appCase.getAtomicSources().size() == 1) {
// single case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
import iped.app.timelinegraph.cache.EventTimestampCache;
import iped.app.timelinegraph.cache.TimeIndexedMap;
import iped.app.timelinegraph.cache.TimeStampCache;
import iped.app.timelinegraph.cache.persistance.CachePersistance;
import iped.app.timelinegraph.cache.persistance.CachePersistence;
import iped.app.ui.App;
import iped.app.ui.CaseSearcherFilter;
import iped.app.ui.Messages;
Expand Down Expand Up @@ -1197,7 +1197,7 @@ public void run() {
t.start();
}

CachePersistance cp = new CachePersistance();
CachePersistence cp = new CachePersistence();

public void addValue(Count count, TimePeriod t, String eventType) {
if (min == null || t.getStart().before(min.getStart())) {
Expand Down

0 comments on commit 1a4c745

Please sign in to comment.