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 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