Skip to content

Provide a builder-style API for Template methods accepting variable parameters [DATAREDIS-615] #1190

Open
@spring-projects-issues

Description

@spring-projects-issues

Mark Paluch opened DATAREDIS-615 and commented

Methods accepting variable parameters require various overloads to reflect multiple input values.

geoAdd(K key, Point point, M member)
geoAdd(K key, GeoLocation<M> location)
geoAdd(K key, Map<M, Point> memberCoordinateMap)
geoAdd(K key, Iterable<GeoLocation<M>> locations)

Switching to a builder-style API that builds the operand stack and executes with a terminal operation consuming the stack could leverage creating various overloads:

Geo (ReactiveGeoOperations):

Map<V, Point> memberCoordinateMap = …
Collection<GeoLocation<V>> geoLocations = …
Mono<Long> mono = geoOperations.justGeoLocation(POINT_PALERMO, valueFactory.instance())
	.addAll(memberCoordinateMap)
	.addAll(geoLocations)
	.add(POINT_PALERMO, valueFactory.instance())
	.geoAdd(key);

Values (ReactiveValueOperations):

Collection<K> keys = …;
Mono<List<V>> mono = valueOperations.forJustKeys(key2, key1).addAll(keys).multiGet();

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core supporttype: taskA general task

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions