Skip to main content

Default Times

4 replies [Last post]
dc5
Offline
Joined: 2008-08-31
Points: 0

Hey,

I have searched for an answer to this question I have but I could not find one, apologies if this has been asked before and I have missed it.

Can anyone tell what the DEFAULT_EXPIRATION and DEFAULT_LIFETIME is when publishing an advert?

Cheers,

DC5

Message was edited by: dc5

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
adamman71
Offline
Joined: 2007-01-31
Points: 0

Hi,

They are constants one can use in the DiscoveryService when calling remotePublish() and publish() for example. The 'signification' can be found in the Javadoc for these methods.

Cheers,

J.

iiggoorr
Offline
Joined: 2008-09-22
Points: 0

Hi,

public static final int ADV 2
[b]public static final long DEFAULT_EXPIRATION 7200000L
public static final long DEFAULT_LIFETIME 31536000000L[/b]
public static final int GROUP 1
public static final long INFINITE_LIFETIME 9223372036854775807L
public static final long NO_EXPIRATION 9223372036854775807L
public static final int PEER 0

these are the constant field values for discovery service interface.
If I am not mistaking time is given in milliseconds
hope this solve your question.
bb

Message was edited by: iiggoorr

dc5
Offline
Joined: 2008-08-31
Points: 0

Cheers for the replies guys!

DC5

origama
Offline
Joined: 2007-04-19
Points: 0

Hi dc5,
I am almost sure that Expiration Time is the maximum duration in milliseconds for which this document will be cached by peers other than the publisher. While the LifeTime is the maximum duration in milliseconds for which this document should be kept in local cache.

So Default_Expiration and Default_Lifetime should be default values for them.

Cheers.