public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static List<Instance> |
checkAddInstances(ServiceInstancesByProto oldVal,
ServiceInstancesByProto newVal) |
static List<Instance> |
checkDeleteInstances(ServiceInstancesByProto oldVal,
ServiceInstancesByProto newVal) |
static List<ServiceChangeEvent.OneInstanceUpdate> |
checkUpdateInstances(ServiceInstancesByProto oldVal,
ServiceInstancesByProto newVal) |
static boolean |
isHealthyInstance(Instance instance) |
static boolean |
regMatch(String regex,
String input)
用正则表达式来判断
1.compile(String regex) 将给定的正则表达式编译到模式中。
2.matcher(CharSequence input) 创建匹配给定输入与此模式的匹配器。
3.matches() 尝试将整个区域与模式匹配。
|
static long |
sleepUninterrupted(long millis) |
static String |
translatePath(String path) |
public static long sleepUninterrupted(long millis)
public static boolean regMatch(String regex, String input)
regex - 正则表达式input - 输入文本public static boolean isHealthyInstance(Instance instance)
public static List<Instance> checkAddInstances(ServiceInstancesByProto oldVal, ServiceInstancesByProto newVal)
public static List<ServiceChangeEvent.OneInstanceUpdate> checkUpdateInstances(ServiceInstancesByProto oldVal, ServiceInstancesByProto newVal)
public static List<Instance> checkDeleteInstances(ServiceInstancesByProto oldVal, ServiceInstancesByProto newVal)
Copyright © 2024. All rights reserved.