class CacheImpl implements Cache {

    @Override
    @SuppressWarnings("unchecked")
    public <T> void set(final String cacheKey, final int expiration, final Object value, final SerializationType serializationType)
            throws TimeoutException, CacheException {

        switch (getSerializationType(serializationType)) {
        case JAVA:
            set(cacheKey, expiration, (T) value, SerializationType.JAVA, javaTranscoder);
            break;
        case JSON:
            set(cacheKey, expiration, (T) value, SerializationType.JSON, jsonTranscoder);
            break;
        case PROVIDER:
            set(cacheKey, expiration, (T) value, SerializationType.PROVIDER, null);
            break;
        case CUSTOM:
            set(cacheKey, expiration, (T) value, SerializationType.CUSTOM, customTranscoder);
            break;
        default:
            throw new IllegalArgumentException(String.format("Serialization type %s is not supported", serializationType));
        }
    }

      CacheImpl(final String name, final Collection<String> aliases, final CacheClient cacheClient,
            final SerializationType defaultSerializationType, final JsonTranscoder jsonTranscoder, final JavaTranscoder javaTranscoder,
            final CacheTranscoder customTranscoder, final CacheProperties properties);

}