Skip to content

Commit 6fd289c

Browse files
committed
Expose KeyValueAdapter from KeyValueOperations.
See #563
1 parent 93e1f81 commit 6fd289c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/main/java/org/springframework/data/keyvalue/core/KeyValueOperations.java

+6
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,10 @@ public interface KeyValueOperations extends DisposableBean {
191191
* @return mapping context in use.
192192
*/
193193
MappingContext<?, ?> getMappingContext();
194+
195+
/**
196+
* @return {@link KeyValueAdapter} in use.
197+
* @since 3.2.4
198+
*/
199+
KeyValueAdapter getKeyValueAdapter();
194200
}

src/main/java/org/springframework/data/keyvalue/core/KeyValueTemplate.java

+5
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ public boolean exists(KeyValueQuery<?> query, Class<?> type) {
387387
return this.mappingContext;
388388
}
389389

390+
@Override
391+
public KeyValueAdapter getKeyValueAdapter() {
392+
return adapter;
393+
}
394+
390395
@Override
391396
public void destroy() throws Exception {
392397
this.adapter.clear();

0 commit comments

Comments
 (0)