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.StringMINIMUM_CLUSTER_SIZEstatic java.lang.StringMINIMUM_FREE_MEMORYstatic java.lang.StringMINIMUM_PERCENT_FREE_MEMORY
-
Constructor Summary
Constructors Constructor Description DynamicResourceClusteringPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontinueProcessing(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.intgetMinimumClusterSize()longgetMinimumFreeMemory()longgetMinimumPercentFreeMemory()protected voidlogClusterCapped(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, int alreadyProcessed, long freeMemory, long totalMemory)voidsetMinimumClusterSize(int minimumClusterSize)voidsetMinimumFreeMemory(long minimumFreeMemory)voidsetMinimumPercentFreeMemory(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:IResourceClusteringPolicyDetermine whether another resource should be loaded into the resource set and be processed.- Specified by:
continueProcessingin interfaceIResourceClusteringPolicy- Parameters:
resourceSet- The resource set, containing all currently loaded resources.next- The next URI to be processed. Can benullif yet unknown.alreadyProcessed- The number of already processed resources. Note that the resource set may contain more resources.- Returns:
trueif another resource should be processed,falseif 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)
-
-