Package org.eclipse.lemminx.client

## Class AbstractXMLNotifier

- java.lang.Object
- - org.eclipse.lemminx.client.AbstractXMLNotifier

Direct Known Subclasses:
  `InvalidPathWarner`, `LimitExceededWarner`

    public abstract class AbstractXMLNotifier
    extends Object

Sends a notification to the client via a jsonrpc notification while managing cache

### Field Summary

Fields
`protected Map<IXMLSettingFeature,​Set<String>>` `cache`

### Constructor Summary

Constructors
`AbstractXMLNotifier​(IXMLNotificationService notificationService)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addToCache​(IXMLSettingFeature key, String value)` Adds `value` to the cache set identified by `key` If such cache set does not exist, this method will initialize it with `value` added
`void` `evictKey​(IXMLSettingFeature key)` Evicts the set identified by the provided key, from the cache
`void` `evictValue​(String value)` Evicts the provided value from all cached sets
`boolean` `existsInCache​(IXMLSettingFeature key, String value)` Returns true if `value` exists in the cache set identified by `key` and false otherwise
`boolean` `existsInCache​(IXMLSettingFeature key, Set<String> values)` Returns true if `values` is equal to the cache set identified by `key` and false otherwise
`protected SharedSettings` `getSharedSettings()`
`protected void` `sendNotification​(String message, org.eclipse.lsp4j.MessageType messageType, org.eclipse.lsp4j.Command... commands)`
`void` `setCacheValues​(IXMLSettingFeature key, Set<String> values)` Sets the cache set identified by `key`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### cache

    protected final Map<IXMLSettingFeature,​Set<String>> cache

### Constructor Detail

#### AbstractXMLNotifier

    public AbstractXMLNotifier​(IXMLNotificationService notificationService)

### Method Detail

#### existsInCache

    public boolean existsInCache​(IXMLSettingFeature key,
                                 String value)

Returns true if `value` exists in the cache set identified by `key` and false otherwise

Parameters:
  `key` - the key for the cache set
  `value` - the value to check
Returns:
  true if `value` exists in the cache set identified by `key` and false otherwise

#### existsInCache

    public boolean existsInCache​(IXMLSettingFeature key,
                                 Set<String> values)

Returns true if `values` is equal to the cache set identified by `key` and false otherwise

Parameters:
  `key` - the key for the cache set
  `values` - the values set to check
Returns:
  true if `values` is equal to the cache set identified by `key` and false otherwise

#### addToCache

    public void addToCache​(IXMLSettingFeature key,
                           String value)

Adds `value` to the cache set identified by `key` If such cache set does not exist, this method will initialize it with `value` added

Parameters:
  `key` - the key for the cache set to add to
  `value` - the value to add

#### setCacheValues

    public void setCacheValues​(IXMLSettingFeature key,
                               Set<String> values)

Sets the cache set identified by `key`

Parameters:
  `key` - the key for the cache set
  `values` - the cache set

#### evictKey

    public void evictKey​(IXMLSettingFeature key)

Evicts the set identified by the provided key, from the cache

Parameters:
  `key` -

#### evictValue

    public void evictValue​(String value)

Evicts the provided value from all cached sets

Parameters:
  `value` -

#### sendNotification

    protected void sendNotification​(String message,
                                    org.eclipse.lsp4j.MessageType messageType,
                                    org.eclipse.lsp4j.Command... commands)

#### getSharedSettings

    protected SharedSettings getSharedSettings()