final int queueSize = ClusteredCacheResource.QUEUE_SIZE.resolveModelAttribute(context, cache).asInt();
final long queueFlushInterval = ClusteredCacheResource.QUEUE_FLUSH_INTERVAL.resolveModelAttribute(context, cache).asLong();
final boolean asyncMarshalling = ClusteredCacheResource.ASYNC_MARSHALLING.resolveModelAttribute(context, cache).asBoolean();
// adjust the cache mode used based on the value of clustered attribute MODE
CacheMode cacheMode = mode.apply(this.mode);
builder.clustering().cacheMode(cacheMode);
// process clustered cache attributes and elements
if (cacheMode.isSynchronous()) {
builder.clustering().sync().replTimeout(remoteTimeout);
} else {
builder.clustering().async().useReplQueue(queueSize > 0);
builder.clustering().async().replQueueMaxElements(queueSize);
builder.clustering().async().replQueueInterval(queueFlushInterval);