Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,16 @@ protected void deleteBinaryResources(final Set<URI> toBeDeleted) {
}
}

/**
* Invalidate cached binary models.
* @param uris collection of URIs to invalidate cached binary models for.
*/
protected void invalidateBinaryResoureCache(final Collection<URI> uris) {
if (isBinaryModelStorageAvailable) {
targetPlatformManager.getPlatform().getBinaryModelStore().invalidateCache(uris);
}
}

/**
* Waits until binary models are stored.
* Uses default parameters for timeout and retries, kept for backward compatibility.
Expand Down Expand Up @@ -845,7 +855,7 @@ protected void awaitBinaryStorageExecutorTermination(final int timeout, final Ti
terminateBinaryStorageExecutor();
}
} catch (InterruptedException e) {
LOGGER.warn("Interrupted waiting for binaryStorageExecutor shutdown, terminating. Had {} queued / {} active before interrupd; now have {} / {}", prevQueuedTaskCount, prevActiveTaskCount, binaryStorageExecutor.getQueue().size(), binaryStorageExecutor.getActiveCount());
LOGGER.warn("Interrupted waiting for binaryStorageExecutor shutdown, terminating. Had {} queued / {} active before interrupt; now have {} / {}", prevQueuedTaskCount, prevActiveTaskCount, binaryStorageExecutor.getQueue().size(), binaryStorageExecutor.getActiveCount());
terminateBinaryStorageExecutor();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Collection;
import java.util.Map;

import org.eclipse.emf.common.util.URI;
Expand Down Expand Up @@ -76,6 +77,16 @@ public interface IBinaryModelStore {
*/
void delete(URI uri) throws IOException;

/**
* Invalidate cached data for the given collection of URIs.
*
* @param uris
* the URIs to invalidate cached data for.
*/
default void invalidateCache(final Collection<URI> uris) {
// do nothing by default
}

/**
* Default no-op implementation throwing runtime exceptions when calling {@link #createInputStream(URI)} or {@link #createOutputStream(URI)} as that means
* the application has not been configured correctly.
Expand Down