CacheDirectiveInfo.Builder (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.protocol, class: CacheDirectiveInfo, class: Builder

Package org.apache.hadoop.hdfs.protocol

# Class CacheDirectiveInfo.Builder

java.lang.Object
org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo.Builder

Enclosing class:
  CacheDirectiveInfo

public static class CacheDirectiveInfo.Builder extends Object
A builder for creating new CacheDirectiveInfo instances.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`
  Creates an empty builder.
  `Builder(CacheDirectiveInfo directive)`
  Creates a builder with all elements set to the same values as the given CacheDirectiveInfo.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CacheDirectiveInfo`
  `build()`
  Builds a new CacheDirectiveInfo populated with the set properties.
  `CacheDirectiveInfo.Builder`
  `setExpiration(CacheDirectiveInfo.Expiration expiration)`
  Sets when the CacheDirective should expire.
  `CacheDirectiveInfo.Builder`
  `setId(Long id)`
  Sets the id used in this request.
  `CacheDirectiveInfo.Builder`
  `setPath(org.apache.hadoop.fs.Path path)`
  Sets the path used in this request.
  `CacheDirectiveInfo.Builder`
  `setPool(String pool)`
  Sets the pool used in this request.
  `CacheDirectiveInfo.Builder`
  `setReplication(Short replication)`
  Sets the replication used in this request.

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

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

- ## Constructor Details

  - ### Builder

    public Builder()
    Creates an empty builder.

  - ### Builder

    public Builder(CacheDirectiveInfo directive)
    Creates a builder with all elements set to the same values as the given CacheDirectiveInfo.

- ## Method Details

  - ### build

    public CacheDirectiveInfo build()
    Builds a new CacheDirectiveInfo populated with the set properties.
    Returns:
      New CacheDirectiveInfo.

  - ### setId

    public CacheDirectiveInfo.Builder setId(Long id)
    Sets the id used in this request.
    Parameters:
      `id` - The id used in this request.
    Returns:
      This builder, for call chaining.

  - ### setPath

    public CacheDirectiveInfo.Builder setPath(org.apache.hadoop.fs.Path path)
    Sets the path used in this request.
    Parameters:
      `path` - The path used in this request.
    Returns:
      This builder, for call chaining.

  - ### setReplication

    public CacheDirectiveInfo.Builder setReplication(Short replication)
    Sets the replication used in this request.
    Parameters:
      `replication` - The replication used in this request.
    Returns:
      This builder, for call chaining.

  - ### setPool

    public CacheDirectiveInfo.Builder setPool(String pool)
    Sets the pool used in this request.
    Parameters:
      `pool` - The pool used in this request.
    Returns:
      This builder, for call chaining.

  - ### setExpiration

    public CacheDirectiveInfo.Builder setExpiration(CacheDirectiveInfo.Expiration expiration)
    Sets when the CacheDirective should expire. A `CacheDirectiveInfo.Expiration` can specify either an absolute or relative expiration time.
    Parameters:
      `expiration` - when this CacheDirective should expire
    Returns:
      This builder, for call chaining