コード例 #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();
 }
コード例 #2
0
 @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);
 }
コード例 #3
0
ファイル: UUIDUtil.java プロジェクト: HackShare/cassandra-dao
 private UUIDUtil() {
   generators = Generators.timeBasedGenerator();
 }
コード例 #4
0
 protected void createToken() {
   this.token = Generators.randomBasedGenerator().generate().toString();
 }