@@ -142,7 +142,7 @@ protected void doInit() {
142142 * Subclasses should override {@link #doInit()} to prepare any resources
143143 * before the secrets are rotated.
144144 */
145- public final void init () {
145+ public final void init () throws SchemaRegistryStoreException {
146146 if (encoderSecret != null && !initialized .get ()) {
147147 doInit ();
148148 maybeRotateSecrets ();
@@ -162,14 +162,16 @@ public final void init() {
162162 /**
163163 * Get the encoder wrapper for a tenant.
164164 */
165- protected abstract KeysetWrapper getEncoderWrapper (String tenant );
165+ protected abstract KeysetWrapper getEncoderWrapper (String tenant )
166+ throws SchemaRegistryStoreException ;
166167
167168 /**
168169 * Store an encoder wrapper for a tenant.
169170 */
170- protected abstract void putEncoderWrapper (String tenant , KeysetWrapper wrapper );
171+ protected abstract void putEncoderWrapper (String tenant , KeysetWrapper wrapper )
172+ throws SchemaRegistryStoreException ;
171173
172- protected void maybeRotateSecrets () {
174+ protected void maybeRotateSecrets () throws SchemaRegistryStoreException {
173175 String oldSecret = encoderOldSecret (schemaRegistry .config ());
174176 if (oldSecret != null ) {
175177 log .info ("Rotating encoder secret" );
@@ -203,7 +205,7 @@ public void waitForInit() throws InterruptedException {
203205 }
204206
205207 @ VisibleForTesting
206- public abstract KeysetHandle getEncoder (String tenant );
208+ public abstract KeysetHandle getEncoder (String tenant ) throws SchemaRegistryStoreException ;
207209
208210 public void encodeMetadata (SchemaValue schema ) throws SchemaRegistryStoreException {
209211 if (!initialized .get () || schema == null || isEncoded (schema )) {
@@ -305,7 +307,8 @@ private void transformMetadata(
305307 }
306308 }
307309
308- protected abstract KeysetHandle getOrCreateEncoder (String tenant );
310+ protected abstract KeysetHandle getOrCreateEncoder (String tenant )
311+ throws SchemaRegistryStoreException ;
309312
310313 @ Override
311314 public abstract void close ();
0 commit comments