Class DynamicResourceClusteringPolicy
- java.lang.Object
-
- org.eclipse.xtext.resource.clustering.DynamicResourceClusteringPolicy
-
- All Implemented Interfaces:
IResourceClusteringPolicy
public class DynamicResourceClusteringPolicy extends java.lang.Object implements IResourceClusteringPolicy
- Since:
- 2.7
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MINIMUM_CLUSTER_SIZE
static java.lang.String
MINIMUM_FREE_MEMORY
static java.lang.String
MINIMUM_PERCENT_FREE_MEMORY
-
Constructor Summary
Constructors Constructor Description DynamicResourceClusteringPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
continueProcessing(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI next, int alreadyProcessed)
Determine whether another resource should be loaded into the resource set and be processed.int
getMinimumClusterSize()
long
getMinimumFreeMemory()
long
getMinimumPercentFreeMemory()
protected void
logClusterCapped(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, int alreadyProcessed, long freeMemory, long totalMemory)
void
setMinimumClusterSize(int minimumClusterSize)
void
setMinimumFreeMemory(long minimumFreeMemory)
void
setMinimumPercentFreeMemory(long minimumPercentFreeMemory)
-
-
-
Field Detail
-
MINIMUM_FREE_MEMORY
public static final java.lang.String MINIMUM_FREE_MEMORY
- See Also:
- Constant Field Values
-
MINIMUM_CLUSTER_SIZE
public static final java.lang.String MINIMUM_CLUSTER_SIZE
- See Also:
- Constant Field Values
-
MINIMUM_PERCENT_FREE_MEMORY
public static final java.lang.String MINIMUM_PERCENT_FREE_MEMORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
continueProcessing
public boolean continueProcessing(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI next, int alreadyProcessed)
Description copied from interface:IResourceClusteringPolicy
Determine whether another resource should be loaded into the resource set and be processed.- Specified by:
continueProcessing
in interfaceIResourceClusteringPolicy
- Parameters:
resourceSet
- The resource set, containing all currently loaded resources.next
- The next URI to be processed. Can benull
if yet unknown.alreadyProcessed
- The number of already processed resources. Note that the resource set may contain more resources.- Returns:
true
if another resource should be processed,false
if a new cluster should be created.
-
logClusterCapped
protected void logClusterCapped(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, int alreadyProcessed, long freeMemory, long totalMemory)
-
getMinimumFreeMemory
public long getMinimumFreeMemory()
-
setMinimumFreeMemory
public void setMinimumFreeMemory(long minimumFreeMemory)
-
getMinimumClusterSize
public int getMinimumClusterSize()
-
setMinimumClusterSize
public void setMinimumClusterSize(int minimumClusterSize)
-
getMinimumPercentFreeMemory
public long getMinimumPercentFreeMemory()
-
setMinimumPercentFreeMemory
public void setMinimumPercentFreeMemory(long minimumPercentFreeMemory)
-
-