@Override public void removeProperty( @NotNull final String nodePath, @NotNull Long nodeId, @NotNull String key) { remotePreferencesService.removeProperty(nodePath, nodeId, key); evictValue(cacheProperty, nodePath + CACHE_KEY_SEPARATOR + key); evictValue(cachePropertyKeys, nodePath); }
@NotNull @Override public Long[] setProperty( @NotNull Long rootNodeId, @Nullable String[] nodeNames, @NotNull String nodePath, @NotNull String key, @NotNull String value) { final Long[] createdIds = remotePreferencesService.setProperty(rootNodeId, nodeNames, nodePath, key, value); putValue(cacheProperty, nodePath + CACHE_KEY_SEPARATOR + key, value); evictValue(cachePropertyKeys, nodePath); return createdIds; }
@Override public void removeNode( @NotNull String parentNodePath, @NotNull String nodeName, @NotNull Long nodeId) throws BackingStoreException { remotePreferencesService.removeNode(parentNodePath, nodeName, nodeId); evictValue(cacheNode, parentNodePath + CACHE_KEY_SEPARATOR + nodeName); final String nodePath = parentNodePath + PREFERENCES_NAME_SEPARATOR + nodeName; evictValue(cacheNodeNames, nodePath); final String[] propertyKeys = getValue(new EmptyCallback<String[], BackingStoreException>(), cachePropertyKeys, nodePath); if (ArrayUtils.isNotEmpty(propertyKeys)) { for (String propertyKey : propertyKeys) { evictValue(cacheProperty, nodePath + CACHE_KEY_SEPARATOR + propertyKey); } } evictValue(cachePropertyKeys, nodePath); }