Top Description Fields Constructors Methods
net.fortuna.ical4j.util

public Class FixedUidGenerator

extends Object
implements UidGenerator
Class Inheritance
All Implemented Interfaces
net.fortuna.ical4j.util.UidGenerator, java.util.function.Supplier
Imports
net.fortuna.ical4j.model.TemporalAdapter, net.fortuna.ical4j.model.property.Uid, java.net.SocketException, java.time.Instant, java.util.concurrent.TimeUnit

$Id$ Created on 11/03/2007 Generates Uid properties in a similar fashion to that recommended in section 4.8.4.7 of the specification.
Author
Ben Fortuna

Field Summary

Modifier and TypeField and Description
private final String
private static long
private final String

Constructor Summary

AccessConstructor and Description
public
FixedUidGenerator(String
a unique process identifier for the host machine
pid
)

public
FixedUidGenerator(HostInfo
custom host information
hostInfo
,
String
a unique process identifier for the host machine
pid
)

Method Summary

Modifier and TypeMethod and Description
public Uid
private static TemporalAdapter<Instant>

Returns:

a TemporalAdapter<Instant> instance representing a unique timestamp
uniqueTimestamp
()

Generates a timestamp guaranteed to be unique for the current JVM instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hostNameback to summary
private final String hostName
lastMillisback to summary
private static long lastMillis
pidback to summary
private final String pid

Constructor Detail

FixedUidGeneratorback to summary
public FixedUidGenerator(String pid) throws SocketException
Parameters
pid:String

a unique process identifier for the host machine

Exceptions
SocketException:
where host information cannot be retrieved
FixedUidGeneratorback to summary
public FixedUidGenerator(HostInfo hostInfo, String pid)
Parameters
hostInfo:HostInfo

custom host information

pid:String

a unique process identifier for the host machine

Method Detail

generateUidback to summary
public Uid generateUid()

Implements net.fortuna.ical4j.util.UidGenerator.generateUid.

Returns:Uid

Doc from net.fortuna.ical4j.util.UidGenerator.generateUid.

a unique component identifier

Annotations
@Override
uniqueTimestampback to summary
private static TemporalAdapter<Instant> uniqueTimestamp()

Generates a timestamp guaranteed to be unique for the current JVM instance.

Returns:TemporalAdapter<Instant>

a TemporalAdapter<Instant> instance representing a unique timestamp