com.h3c.util

## Class MarkPageRequest<M>

- java.lang.Object
- - com.h3c.util.PageRequest
  - - com.h3c.util.MarkPageRequest<M>

- Type Parameters:
    `M` - type of the mark.
  All Implemented Interfaces:
    Serializable

      public class MarkPageRequest<M>
      extends PageRequest

  This is a mark based page request for use with NOSQL databases such as Cassandra. This page request holds a mark to start reading the page and the direction to Navigate. This page request is embedded in the `MarkPage` and sent back to the caller when a page is read. The mark and navigation is updated. The caller can use this request for subsequent paged read on the database
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MarkPageRequest.Navigation` Page Navigation type.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MarkPageRequest(int pageSize)` Creates a request for the first page.
    `MarkPageRequest(M mark, MarkPageRequest.Navigation navigation, int pageSize)` Creates a request for any page.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> MarkPageRequest<T>` | `convert(T convertedMark)` Converts the page request to use a converted mark.
    `boolean` | `equals(Object obj)`
    `M` | `getMark()`
    `MarkPageRequest.Navigation` | `getNavigation()`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class com.h3c.util.PageRequest

      `getPageIndex, getPageSize`

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

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

- - ### Constructor Detail

    - #### MarkPageRequest

          public MarkPageRequest(int pageSize)

      Creates a request for the first page.
      Parameters:
        `pageSize` - page size (maximum number of data items per page).

    - #### MarkPageRequest

          public MarkPageRequest(M mark,
                         MarkPageRequest.Navigation navigation,
                         int pageSize)

      Creates a request for any page.
      Parameters:
        `mark` - the mark to use in the subsequent requests
        `navigation` - the direction of read. It could be NEXT for next page and PREVIOUS for the previous page.
        `pageSize` - the size of this page.

  - ### Method Detail

    - #### getMark

          public M getMark()

    - #### getNavigation

          public MarkPageRequest.Navigation getNavigation()

    - #### convert

          public <T> MarkPageRequest<T> convert(T convertedMark)

      Converts the page request to use a converted mark.
      Parameters:
        `convertedMark` - converted mark.
      Returns:
        a mark page request with a converted mark.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `PageRequest`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `PageRequest`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.