class RedisService {

    public long incrementVersion() {
        long currentVersion = (Long) this.redisTemplate.execute(new RedisCallback() {
            @Override
            public Object doInRedis(RedisConnection connection) throws DataAccessException {
                return connection.incr(Constant.TRUNK_VERSIONS.getBytes());
            }
        });
        return currentVersion;
    }

}