Package org.apache.lucene.replicator
Class SessionToken
- java.lang.Object
-
- org.apache.lucene.replicator.SessionToken
-
public final class SessionToken extends Object
Token for a replication session, for guaranteeing that source replicated files will be kept safe until the replication completes.- See Also:
Replicator.checkForUpdate(String),Replicator.release(String),LocalReplicator.DEFAULT_SESSION_EXPIRATION_THRESHOLD- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description StringidID of this session.Map<String,List<RevisionFile>>sourceFilesStringversion
-
Constructor Summary
Constructors Constructor Description SessionToken(DataInput in)Constructor which deserializes from the givenDataInput.SessionToken(String id, Revision revision)Constructor with the given id and revision.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidserialize(DataOutput out)Serialize the token data for communication between server and client.StringtoString()
-
-
-
Field Detail
-
id
public final String id
ID of this session. Should be passed when releasing the session, thereby acknowledging theReplicatorthat this session is no longer in use.- See Also:
Replicator.release(String)
-
version
public final String version
- See Also:
Revision.getVersion()
-
sourceFiles
public final Map<String,List<RevisionFile>> sourceFiles
- See Also:
Revision.getSourceFiles()
-
-
Constructor Detail
-
SessionToken
public SessionToken(DataInput in) throws IOException
Constructor which deserializes from the givenDataInput.- Throws:
IOException
-
-
Method Detail
-
serialize
public void serialize(DataOutput out) throws IOException
Serialize the token data for communication between server and client.- Throws:
IOException
-
-