This file contains hidden or 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; | |
| import lombok.AllArgsConstructor; | |
| import lombok.Data; | |
| import lombok.NoArgsConstructor; | |
| import lombok.RequiredArgsConstructor; | |
| import java.io.Serializable; | |
| import org.springframework.boot.CommandLineRunner; |
This file contains hidden or 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 2018 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 hidden or 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 hidden or 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
| RedisClient redisClient = RedisClient.create(RedisURI.Builder.redis("localhost", 6379).build()); | |
| StatefulRedisConnection<String, String> redis = redisClient.connect(); | |
| RedisChannelHandler<String, String> channelHandler = (RedisChannelHandler) redis; | |
| CommandHandler<String, String> commandHandler = (CommandHandler) channelHandler.getChannelWriter(); | |
| Collection<RedisCommand<String, String, ?>> disconnectedBuffer = null; // reflective access to commandHandler.disconnectedBuffer | |
| Collection<RedisCommand<String, String, ?>> commandBuffer = null; // reflective access to commandHandler.commandBuffer | |
This file contains hidden or 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.demo9; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.CommandLineRunner; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| @SpringBootApplication | |
| public class Demo9Application implements CommandLineRunner { |
This file contains hidden or 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 2015-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 hidden or 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 com.lambdaworks.redis.RedisClient; | |
| import com.lambdaworks.redis.ScriptOutputType; | |
| import com.lambdaworks.redis.api.StatefulRedisConnection; | |
| import com.lambdaworks.redis.codec.ByteArrayCodec; | |
| /** | |
| * @author Mark Paluch | |
| */ | |
| public class EvalWithByteArrayCodec { |
This file contains hidden or 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.nio.ByteBuffer; | |
| import com.lambdaworks.redis.codec.ByteArrayCodec; | |
| import com.lambdaworks.redis.codec.RedisCodec; | |
| import com.lambdaworks.redis.codec.StringCodec; | |
| /** | |
| * @author Mark Paluch | |
| */ | |
| class StringByteRedisCodec implements RedisCodec<String, byte[]> { |
This file contains hidden or 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; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| @SpringBootApplication | |
| public class CassandraPlaygroundApplication { | |
| public static void main(String[] args) { | |
| SpringApplication.run(CassandraPlaygroundApplication.class, args); |
This file contains hidden or 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.netty.handler.codec.http.HttpHeaderNames; | |
| import reactor.core.publisher.Hooks; | |
| import reactor.core.publisher.Mono; | |
| import reactor.ipc.netty.NettyContext; | |
| import reactor.ipc.netty.http.server.HttpServer; | |
| import java.io.IOException; | |
| import java.nio.file.FileSystem; | |
| import java.nio.file.FileSystems; | |
| import java.nio.file.Path; |