@Override
    public Ticket getTicket(final String ticketId, final Predicate<Ticket> predicate) {
        LOGGER.trace("Locating ticket [{}]", ticketId);
        val encodedTicketId = digestIdentifier(ticketId);
        if (StringUtils.isBlank(encodedTicketId)) {
            LOGGER.debug("Ticket id [{}] could not be found", ticketId);
            return null;
        }

        val definition = ticketCatalog.find(ticketId);
        if (definition == null) {
            LOGGER.debug("Ticket definition [{}] could not be found in the ticket catalog", ticketId);
            return null;
        }

        val holder = findCassandraTicketBy(definition, encodedTicketId);
        if (holder.isEmpty()) {
            LOGGER.debug("Ticket [{}] could not be found in Cassandra", encodedTicketId);
            return null;
        }

        val document = holder.iterator().next();
        val object = deserializeTicket(document.getData(), document.getType());
        val result = decodeTicket(object);
        return FunctionUtils.doAndReturn(result != null && predicate.test(result), () -> result, () -> {
            LOGGER.trace("The condition enforced by the predicate [{}] cannot successfully accept/test the ticket id [{}]", encodedTicketId,
                predicate.getClass().getSimpleName());
            return null;
        });
    }
This is {@link CassandraTicketRegistry}.

@author Misagh Moayyed
@author doomviking
@since 6.1.0
support/cas-server-support-cassandra-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/CassandraTicketRegistry.java