本文整理了Java中org.jgroups.util.Util.stringToBytes()
方法的一些代码示例,展示了Util.stringToBytes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.stringToBytes()
方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:stringToBytes
暂无
代码示例来源:origin: wildfly/wildfly
public SiteMaster(String site) {
this(Util.stringToBytes(site));
}
代码示例来源:origin: wildfly/wildfly
public SiteUUID(long mostSigBits, long leastSigBits, String name, String site) {
super(mostSigBits,leastSigBits);
if(name != null)
put(NAME, Util.stringToBytes(name));
put(SITE_NAME, Util.stringToBytes(site));
}
代码示例来源:origin: wildfly/wildfly
public ExtendedUUID put(String key, byte[] val) {
return put(Util.stringToBytes(key), val);
}
代码示例来源:origin: wildfly/wildfly
public boolean keyExists(String key) {
return keyExists(Util.stringToBytes(key));
}
代码示例来源:origin: wildfly/wildfly
public byte[] get(String key) {
return get(Util.stringToBytes(key));
}
代码示例来源:origin: wildfly/wildfly
public byte[] remove(String key) {
return remove(Util.stringToBytes(key));
}
代码示例来源:origin: wildfly/wildfly
public SiteUUID(UUID uuid, String name, String site) {
super(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
if(name != null)
put(NAME, Util.stringToBytes(name));
put(SITE_NAME, Util.stringToBytes(site));
}
代码示例来源:origin: wildfly/wildfly
@Override
public Address generateAddress() {
ExtendedUUID uuid = ExtendedUUID.randomUUID();
uuid.put(SITE, Util.stringToBytes(this.topology.getSite()));
uuid.put(RACK, Util.stringToBytes(this.topology.getRack()));
uuid.put(MACHINE, Util.stringToBytes(this.topology.getMachine()));
return uuid;
}
}
代码示例来源:origin: wildfly/wildfly
public void init() throws Exception {
super.init();
if(site == null || site.isEmpty())
throw new IllegalArgumentException("\"site\" must be set");
timer=getTransport().getTimer();
JChannel channel=getProtocolStack().getChannel();
if(channel == null)
throw new IllegalStateException("channel must be set");
channel.addAddressGenerator(() -> ExtendedUUID.randomUUID().put(SITE_ID, Util.stringToBytes(site)));
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public SiteMaster(String site) {
this(Util.stringToBytes(site));
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public SiteUUID(long mostSigBits, long leastSigBits, String name, String site) {
super(mostSigBits,leastSigBits);
if(name != null)
put(NAME, Util.stringToBytes(name));
put(SITE_NAME, Util.stringToBytes(site));
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public ExtendedUUID put(String key, byte[] val) {
return put(Util.stringToBytes(key), val);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public byte[] get(String key) {
return get(Util.stringToBytes(key));
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public byte[] remove(String key) {
return remove(Util.stringToBytes(key));
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public boolean keyExists(String key) {
return keyExists(Util.stringToBytes(key));
}
代码示例来源:origin: org.jboss.eap/wildfly-clustering-jgroups-extension
@Override
public Address generateAddress() {
ExtendedUUID uuid = ExtendedUUID.randomUUID();
uuid.put(SITE, Util.stringToBytes(this.topology.getSite()));
uuid.put(RACK, Util.stringToBytes(this.topology.getRack()));
uuid.put(MACHINE, Util.stringToBytes(this.topology.getMachine()));
return uuid;
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public SiteUUID(UUID uuid, String name, String site) {
super(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
if(name != null)
put(NAME, Util.stringToBytes(name));
put(SITE_NAME, Util.stringToBytes(site));
}
代码示例来源:origin: org.infinispan.server/infinispan-server-jgroups
@Override
public Address generateAddress() {
ExtendedUUID uuid = ExtendedUUID.randomUUID();
uuid.put(SITE, Util.stringToBytes(this.topology.getSite()));
uuid.put(RACK, Util.stringToBytes(this.topology.getRack()));
uuid.put(MACHINE, Util.stringToBytes(this.topology.getMachine()));
return uuid;
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public void init() throws Exception {
super.init();
if(site == null || site.isEmpty())
throw new IllegalArgumentException("\"site\" must be set");
timer=getTransport().getTimer();
JChannel channel=getProtocolStack().getChannel();
if(channel == null)
throw new IllegalStateException("channel must be set");
channel.addAddressGenerator(() -> ExtendedUUID.randomUUID().put(SITE_ID, Util.stringToBytes(site)));
}
内容来源于网络,如有侵权,请联系作者删除!