This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demor2dbc | |
import kotlinx.coroutines.flow.Flow | |
import org.springframework.beans.factory.InitializingBean | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.runApplication | |
import org.springframework.data.r2dbc.repository.config.EnableR2dbcRepositories | |
import org.springframework.data.repository.kotlin.CoroutineCrudRepository | |
import org.springframework.stereotype.Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2020 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2020 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class DemoApplicationSpringBootGh15311 { | |
public static void main(String[] args) { | |
SpringApplication.run(DemoApplication.class, args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import com.lambdaworks.redis.*; | |
public class LettuceGeoDemo { | |
public static void main(String[] args) { | |
RedisClient redisClient = new RedisClient("localhost", 6379); | |
RedisConnection<String, String> redis = redisClient.connect(); | |
String key = "my-geo-set"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MultithreadedExample { | |
public static void main(String[] args) throws Exception{ | |
// Syntax: redis://[password@]host[:port][/databaseNumber] | |
RedisClient redisClient = RedisClient.create(RedisURI.create("redis://localhost:6379/0")); | |
CountDownLatch latch = new CountDownLatch(1); | |
List<RedisThread> threads = IntStream.range(0, 100).mapToObj(ignore -> new RedisThread(redisClient, latch)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.r2dbc.mssql.MssqlConnectionConfiguration; | |
import io.r2dbc.mssql.MssqlConnectionFactory; | |
public class Reproducer { | |
public static void main(String[] args) { | |
MssqlConnectionConfiguration config = MssqlConnectionConfiguration.builder() | |
.host("abcbookstore.database.windows.net") | |
.database("foo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2017 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* OUT and IN/OUT parameter wrapper for stored procedures (callable functions). | |
* | |
* @param <T> | |
*/ | |
class Parameter<T> { | |
@Nullable | |
private final T value; |