Esempio n. 1
0
 @PrePersist
 private void preInsert() {
   Timestamp insertTime = new Timestamp(new DateTime(DateTimeZone.UTC).getMillis());
   this.created = insertTime;
   this.updated = insertTime;
   this.identity = Generators.timeBasedGenerator().generate().toString();
 }
 @Override
 public MulticastEngine construct() throws IOException {
   NetworkInterface networkInterface = getNetworkInterface();
   MulticastSocket socket = Common.connect(multicastGroup, ttl, networkInterface);
   return new MulticastEngine(
       getFdFactory(),
       Generators.timeBasedGenerator(),
       heartbeatPeriod,
       heartbeatUnit,
       socket,
       multicastGroup,
       receiveBufferMultiplier,
       sendBufferMultiplier,
       getMac(),
       networkInterface);
 }
Esempio n. 3
0
 private UUIDUtil() {
   generators = Generators.timeBasedGenerator();
 }
 protected void createToken() {
   this.token = Generators.randomBasedGenerator().generate().toString();
 }