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 and Description
    --- | ---
    `String` | `id` ID of this session.
    `Map<String,List<RevisionFile>>` | `sourceFiles`
    `String` | `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SessionToken(DataInput in)` Constructor which deserializes from the given `DataInput`.
    `SessionToken(String id, Revision revision)` Constructor with the given id and revision.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `serialize(DataOutput out)` Serialize the token data for communication between server and client.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### id

          public final String id

      ID of this session. Should be passed when releasing the session, thereby acknowledging the `Replicator` that 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 given `DataInput`.
      Throws:
        `IOException`

    - #### SessionToken

          public SessionToken(String id,
                              Revision revision)

      Constructor with the given id and revision.

  - ### Method Detail

    - #### serialize

          public void serialize(DataOutput out)
                         throws IOException

      Serialize the token data for communication between server and client.
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.