001/* 002 * Copyright 2022-2026 Revetware LLC. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package com.soklet; 018 019import org.jspecify.annotations.NonNull; 020 021import javax.annotation.concurrent.ThreadSafe; 022 023/** 024 * Thread-safe server-owned control plane for localized MCP catalog 025 * invalidation. 026 * <p> 027 * The invalidator is local to one server. Applications distribute and install 028 * immutable translation snapshots themselves, then invoke it on every 029 * applicable instance. 030 * 031 * @author <a href="https://www.revetkn.com">Mark Allen</a> 032 */ 033@ThreadSafe 034public interface McpLocalizationCatalogInvalidator { 035 /** @return whether localization was enabled when the server was built */ 036 @NonNull 037 Boolean isEnabled(); 038 039 /** 040 * Invalidates future derived localized render state and publishes coarse 041 * framework-owned list-change notifications to eligible local streams. The 042 * call returns after the current generation accepts or coalesces the 043 * invalidation, not after client delivery. It is safe before start and after 044 * stop, when there is no active stream to notify. 045 * 046 * @throws IllegalStateException if localization is disabled 047 */ 048 void invalidateCatalogs(); 049}