Skip to content

Commit b6c5e59

Browse files
fussel178pklaschka
andcommitted
feat(api)!: Remove defaultStorageKey method in WithSharedData interface
BREAKING-CHANGE: Remove `defaultStorageKey` method in `WithSharedData` interface. Co-authored-by: pklaschka <[email protected]>
1 parent a661e02 commit b6c5e59

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

telestion-api/src/main/java/de/wuespace/telestion/api/verticle/trait/WithSharedData.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import io.vertx.core.shareddata.LocalMap;
77

88
/**
9-
* Allows {@link Verticle} instances to get simplified access to Vert.x shared data
9+
* Allows {@link Verticle} instances to get simplified access to Vert.x shared data.
1010
*
1111
* <h2>Usage</h2>
1212
* <pre>
@@ -52,7 +52,7 @@ default <K, V> Future<AsyncMap<K, V>> remoteMap(String storageSpace) {
5252
* @return the default local map for this specific verticle
5353
*/
5454
default <K, V> LocalMap<K, V> defaultLocalMap() {
55-
return localMap(defaultStorageKey());
55+
return localMap("@@__PRIVATE/" + getClass().getName());
5656
}
5757

5858
/**
@@ -62,15 +62,6 @@ default <K, V> LocalMap<K, V> defaultLocalMap() {
6262
* @return the default remote map for this specific verticle
6363
*/
6464
default <K, V> Future<AsyncMap<K, V>> defaultRemoteMap() {
65-
return remoteMap(defaultStorageKey());
66-
}
67-
68-
/**
69-
* Return the default storage key for this specific verticle
70-
* used for the {@link #defaultLocalMap()} and {@link #defaultRemoteMap()} verticle storage spaces.
71-
* @return the default storage key for this specific verticle
72-
*/
73-
default String defaultStorageKey() {
74-
return getClass().getName();
65+
return remoteMap("@@__PRIVATE/" + getClass().getName());
7566
}
7667
}

0 commit comments

Comments
 (0)