The get-last-read-generation
task retrieves the last-read generation for a given client ID.
Before running this task, make sure to use the set-last-read-generation
task to set a last-read generation for a specific client ID.
The syntax for this task is:
recordstore-cmd get-last-read-generation -a RecordStoreInstanceName -c ClientId [-h HostName] [-l true|false] [-p PortNumber] [-x Id]
where:
-a (or --instanceName) specifies the name of a Record Store instance. Required.
-c (or --client) specifies a client ID that was previously set with the
set-last-read-generation
task. Required.-h (or --host) specifies the host where the CAS Service is running. If the flag is omitted, the default is the value of the
com.endeca.itl.cas.server.host
property incommandline.properties
. If the property is not set, the value then defaults to localhost. Optional.-l (or --isPortSsl) specifies whether to communicate with the service using an HTTPS connection. A value of true uses HTTPS and treats the
com.endeca.itl.cas.server.port
property as an SSL port. A value of false uses HTTP and treatscom.endeca.itl.cas.server.port
as a non-SSL port. Specify false if you enabled redirects from a non-SSL port to an SSL port. Optional.-p (or --port) specifies the port of the CAS Service. If the flag is omitted, the default is the value of the
com.endeca.itl.cas.server.port
property incommandline.properties
. If the property is not set, the value then defaults to 8500. Optional.-x (or --transaction) specifies the active transaction ID to use. If you use this option, you must follow it with a
commit-transaction
task to commit the read operation. If this flag is omitted, the operation is done in auto-commit mode. Optional.
Example 33. Example of getting the last-read generation
This example gets the last-read generation for the client ID of forge1:
recordstore-cmd get-last-read-generation -a RS1 -c forge1
The command output is similar to this example:
The last read generation id saved for client forge1 is: 2
In the example, Generation 2 had been previously set as the last read generation for the forge1 client ID.