EventProcessorHost.createHostName(String prefix) Method

定义

Convenience method for generating unique host names, safe to pass to the EventProcessorHost constructors that take a hostName argument.

If a prefix is supplied, the constructed name begins with that string. If the prefix argument is null or an empty string, the constructed name begins with "javahost". Then a dash '-' and a UUID are appended to create a unique name.

public static String createHostName(String prefix)

参数

prefix
String

String to use as the beginning of the name. If null or empty, a default is used.

返回

String

A unique host name to pass to EventProcessorHost constructors.

适用于