We have an implementation of IAuthenticator that authenticates clients against Cassandra. The client authenticates w/ Hector by passing a token in the credentials map (the map passed via HFactory.createKeyspace) and the token passed is only valid for so many hours. The client sees an AuthenticationException when the IAuthenticator implementation attempts to authenticate with the expired token.
final Map credentials = new ConcurrentHashMap();
Keyspace keyspace = HFactory.createKeyspace("name", cluster, consistencyLevel, FailoverPolicy.ON_FAIL_TRY_ALL_AVAILABLE, credentials);
and then just before expiration, we would like to set the new token to the credentials map and have Hector/Cassandra use the new credentials for any new connections that are established...