public SiteMaster(String site) { this(Util.stringToBytes(site)); }
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)); }
public ExtendedUUID put(String key, byte[] val) { return put(Util.stringToBytes(key), val); }
public boolean keyExists(String key) { return keyExists(Util.stringToBytes(key)); }
public byte[] get(String key) { return get(Util.stringToBytes(key)); }
public byte[] remove(String key) { return remove(Util.stringToBytes(key)); }
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)); }
@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; } }
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))); }
public SiteMaster(String site) { this(Util.stringToBytes(site)); }
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)); }
public ExtendedUUID put(String key, byte[] val) { return put(Util.stringToBytes(key), val); }
public byte[] get(String key) { return get(Util.stringToBytes(key)); }
public byte[] remove(String key) { return remove(Util.stringToBytes(key)); }
public boolean keyExists(String key) { return keyExists(Util.stringToBytes(key)); }
@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; } }
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)); }
@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; } }
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))); }