@Override
    public long deleteAll() {
        val size = new AtomicLong();
        redisKeyGeneratorFactory.getRedisKeyGenerators().forEach(generator -> {
            val keyPattern = generator.forPrefixAndId("*", "*");
            val options = ScanOptions.scanOptions().match(keyPattern).build();
            try (val result = casRedisTemplates.getTicketsRedisTemplate().scan(options)) {
                casRedisTemplates.getTicketsRedisTemplate().executePipelined((RedisCallback<Object>) connection -> {
                    StreamSupport.stream(result.spliterator(), false).forEach(id -> {
                        connection.keyCommands().del(id.getBytes(StandardCharsets.UTF_8));
                        if (generator.isTicketKeyGenerator()) {
                            size.getAndIncrement();
                        }
                    });
                    return null;
                });
            }
        });
        clean();
        return size.get();
    }
Key-value ticket registry implementation that stores tickets in redis.

@author Misagh Moayyed
@author Jerome Leleu
@since 5.1.0
support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/RedisTicketRegistry.java