LATEST ARTICLES

In previous post I showed how to get cookie from server response with RestTemplate and exchange method. In this article we will use that cookie in order to call other server API GetUsers. private void postMethodWithCookie(String secret) { final String url = "http://codeflex.co:8080/rest/Management/getUsers"; RestTemplate restTemplate = new RestTemplate(); HttpHeaders requestHeaders = new HttpHeaders(); requestHeaders.add("Cookie", "credentials="...
Sometimes in order to be able to perform some actions via REST API server wants the client to be logged in. It may be done by sending to the client some secret code in the response header. In order to get header content we will use exchange method of RestTemplate...
Redis Cluster was released on April 1st, 2015. Since then Redis Cluster is the preferred way to get automatic sharding and high availability. In this article you'll see step by step tutorials about how to install and configure Redis Cluster on Linux. Installation Run the following on your Linux environment: wget http://download.redis.io/releases/redis-3.2.1.tar.gz tar xzf redis-3.2.1.tar.gz cd redis-3.2.1 make The...
Every item stored in Amazon S3 is object, not file, not folder, but object. This often confuses new programmers, because they used to deal with folders and files in file system. Today I'll show how to retrieve a list of objects from specific folder(object) using Java. Lets say you have...
If you need to merge or add values to existing map, or may be perform some other operations for entire map you can use forEach lambda method. For example let's see how to add key-value pairs from one map to other: Map<String, String> myMap = new LinkedHashMap<String, String>(); myMap.put("keyFromOriginalMap", "valueFromOriginalMap"); Map<String, String> anotherMap...

What is Redis

Redis is NoSQL key-value in-memory distributed data store. It can be used as super-fast database, cache or message broker. Redis supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Also, Redis has built-in master-slave replication, two different levels...