Expose KeyValueAdapter from KeyValueOperations.

See #563
This commit is contained in:
Mark Paluch
2024-02-21 09:06:38 +01:00
parent 587f63a9ec
commit c07ad08ee3
2 changed files with 11 additions and 0 deletions

View File

@@ -191,4 +191,10 @@ public interface KeyValueOperations extends DisposableBean {
* @return mapping context in use.
*/
MappingContext<?, ?> getMappingContext();
/**
* @return {@link KeyValueAdapter} in use.
* @since 3.2.4
*/
KeyValueAdapter getKeyValueAdapter();
}

View File

@@ -387,6 +387,11 @@ public class KeyValueTemplate implements KeyValueOperations, ApplicationEventPub
return this.mappingContext;
}
@Override
public KeyValueAdapter getKeyValueAdapter() {
return adapter;
}
@Override
public void destroy() throws Exception {
this.adapter.clear();