Skip to content

Instantly share code, notes, and snippets.

View jerieljan's full-sized avatar

Jeriel Jan del Prado jerieljan

View GitHub Profile
@jerieljan
jerieljan / SynchronizedRedisBlock.java
Created July 28, 2014 01:32
The SynchronizedRedisBlock can be used to create a self-isolating block of Redis transactions with a locking mechanism based on the key name provided. Implement by simply instantiating this class and placing all relevant Redis transactions when implementing #perform().
/*
* SynchronizedRedisBlock v1.0
* v1.0
* June 18, 2014
*
* Copyright 2014, Jeriel Jan del Prado
* 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