Class IdMapService
- java.lang.Object
-
- org.apache.sling.discovery.commons.providers.spi.base.AbstractServiceWithBackgroundCheck
-
- org.apache.sling.discovery.commons.providers.spi.base.IdMapService
-
- All Implemented Interfaces:
ResourceChangeListener
@Deprecated(since="2021-09-30") public class IdMapService extends AbstractServiceWithBackgroundCheck implements ResourceChangeListener
Deprecated.This API is not supported in Cloud Service.The IdMapService is responsible for storing a slingId-clusterNodeId pair to the repository and given all other instances in the cluster do the same can map clusterNodeIds to slingIds (or vice-versa)
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.api.resource.observation.ResourceChangeListener
CHANGE_ADDED, CHANGE_CHANGED, CHANGE_PROVIDER_ADDED, CHANGE_PROVIDER_REMOVED, CHANGE_REMOVED, CHANGES, PATHS, PROPERTY_NAMES_HINT
-
-
Constructor Summary
Constructors Constructor Description IdMapService()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclearCache()Deprecated.longgetMyId()Deprecated.booleanisInitialized()Deprecated.voidonChange(List<ResourceChange> changes)Deprecated.Report resource changes based on the filter properties of this listener.static IdMapServicetestConstructor(DiscoveryLiteConfig commonsConfig, SlingSettingsService settingsService, ResourceResolverFactory resourceResolverFactory)Deprecated.test-only constructor *StringtoSlingId(int clusterNodeId, ResourceResolver resourceResolver)Deprecated.booleanwaitForInit(long timeout)Deprecated.for testing only *
-
-
-
Method Detail
-
testConstructor
public static IdMapService testConstructor(DiscoveryLiteConfig commonsConfig, SlingSettingsService settingsService, ResourceResolverFactory resourceResolverFactory)
Deprecated.test-only constructor *
-
getMyId
public long getMyId()
Deprecated.
-
waitForInit
public boolean waitForInit(long timeout)
Deprecated.for testing only *
-
isInitialized
public boolean isInitialized()
Deprecated.
-
clearCache
public void clearCache()
Deprecated.
-
toSlingId
public String toSlingId(int clusterNodeId, ResourceResolver resourceResolver) throws PersistenceException
Deprecated.- Throws:
PersistenceException
-
onChange
public void onChange(List<ResourceChange> changes)
Deprecated.Description copied from interface:ResourceChangeListenerReport resource changes based on the filter properties of this listener.Starting with version 1.2 of this API, an instance of
ResoureChangeListis passed as the parameter to allow passing additional information.- Specified by:
onChangein interfaceResourceChangeListener- Parameters:
changes- The changes list. This list is immutable.
-
-