
com.alachisoft.ncache.client.util.ClientEnumUtil Maven / Gradle / Ivy
package com.alachisoft.ncache.client.util;
import Alachisoft.NCache.Caching.Util.Log;
import com.alachisoft.ncache.client.*;
import com.alachisoft.ncache.client.internal.caching.CacheItemRemovedReason;
import com.alachisoft.ncache.runtime.caching.DeliveryOption;
import com.alachisoft.ncache.runtime.caching.SubscriptionPolicy;
import com.alachisoft.ncache.runtime.caching.messaging.DeliveryMode;
import com.alachisoft.ncache.runtime.caching.messaging.TopicSearchOptions;
import com.alachisoft.ncache.runtime.events.EventType;
import com.google.protobuf.Internal;
import java.util.EnumSet;
import java.util.List;
public class ClientEnumUtil {
public static TagSearchOptions getTagSearchOptions(Integer value) {
return TagSearchOptions.forValue(value);
}
public static int getTagSearchOptionsValue(TagSearchOptions options) {
return options.getValue();
}
public static IsolationLevel getIsolationLevel(Integer value) {
return IsolationLevel.forValue((value));
}
public static int getIsolationLevelValue(IsolationLevel options) {
return options.getValue();
}
public static ClientCacheSyncMode getCacheClientSyncMode(Integer value) {
return ClientCacheSyncMode.forValue(value);
}
public static int getClientCacheSyncModeValue(ClientCacheSyncMode mode) {
return mode.getValue();
}
public static CacheStatusNotificationType getCacheStatusNotificationType(String value) {
return CacheStatusNotificationType.valueOf(value);
}
public static String getCacheStatusNotificationTypeValue(CacheStatusNotificationType type) {
return type.name().toString();
}
public static DeliveryMode getDeliveryMode(String mode) {
return DeliveryMode.valueOf(mode);
}
public static String getDeliveryModeValue(DeliveryMode mode) {
return mode.name().toString();
}
public static DeliveryOption getDeliveryOption(Integer option) {
return DeliveryOption.forValue(option);
}
public static String getDeliveryOptionValue(DeliveryOption option) {
return option.name().toString();
}
public static SubscriptionPolicy getSubscriptionPolicy(Integer value) {
return SubscriptionPolicy.forValue(value);
}
public static String getSubscriptionPolicyValue(SubscriptionPolicy policy) {
return policy.name().toString();
}
public static CacheItemRemovedReason getCacheItemRemovedReason(Integer value) {
return CacheItemRemovedReason.forValue(value);
}
public static String getCacheItemRemovedReasonValue(CacheItemRemovedReason reason) {
return reason.name().toString();
}
public static LogLevel getLogLevel(Integer value) {
return LogLevel.forValue(value);
}
public static int getLogLevelValue(LogLevel level) {
return level.getValue();
}
public static EnumSet EnumSetCacheStatus(List types) throws Exception {
java.util.EnumSet _eventType = EnumSet.copyOf(types);
return _eventType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy