public static EvictionConfigHolder of(EvictionConfig config, SerializationService serializationService) { return new EvictionConfigHolder(config.getSize(), config.getMaximumSizePolicy().name(), config.getEvictionPolicy().name(), config.getComparatorClassName(), serializationService.toData(config.getComparator())); } }
public static EvictionConfigHolder decode(ClientMessage clientMessage) { int size = clientMessage.getInt(); String maxSizePolicy = clientMessage.getStringUtf8(); String evictionPolicy = clientMessage.getStringUtf8(); boolean isNullComparatorClassName = clientMessage.getBoolean(); String comparatorClassName = null; if (!isNullComparatorClassName) { comparatorClassName = clientMessage.getStringUtf8(); } boolean isNullComparator = clientMessage.getBoolean(); Data comparator = null; if (!isNullComparator) { comparator = clientMessage.getData(); } return new EvictionConfigHolder(size, maxSizePolicy, evictionPolicy, comparatorClassName, comparator); }
public static EvictionConfigHolder of(EvictionConfig config, SerializationService serializationService) { return new EvictionConfigHolder(config.getSize(), config.getMaximumSizePolicy().name(), config.getEvictionPolicy().name(), config.getComparatorClassName(), serializationService.toData(config.getComparator())); } }
public static EvictionConfigHolder decode(ClientMessage clientMessage) { int size = clientMessage.getInt(); String maxSizePolicy = clientMessage.getStringUtf8(); String evictionPolicy = clientMessage.getStringUtf8(); boolean isNullComparatorClassName = clientMessage.getBoolean(); String comparatorClassName = null; if (!isNullComparatorClassName) { comparatorClassName = clientMessage.getStringUtf8(); } boolean isNullComparator = clientMessage.getBoolean(); Data comparator = null; if (!isNullComparator) { comparator = clientMessage.getData(); } return new EvictionConfigHolder(size, maxSizePolicy, evictionPolicy, comparatorClassName, comparator); }
public static EvictionConfigHolder decode(ClientMessage clientMessage) { int size = clientMessage.getInt(); String maxSizePolicy = clientMessage.getStringUtf8(); String evictionPolicy = clientMessage.getStringUtf8(); boolean isNullComparatorClassName = clientMessage.getBoolean(); String comparatorClassName = null; if (!isNullComparatorClassName) { comparatorClassName = clientMessage.getStringUtf8(); } boolean isNullComparator = clientMessage.getBoolean(); Data comparator = null; if (!isNullComparator) { comparator = clientMessage.getData(); } return new EvictionConfigHolder(size, maxSizePolicy, evictionPolicy, comparatorClassName, comparator); }