org.apache.hadoop.hdfs.protocol
Class CacheDirectiveInfo.Builder

java.lang.Object
  extended by 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
CacheDirectiveInfo.Builder()
          Creates an empty builder.
CacheDirectiveInfo.Builder(CacheDirectiveInfo directive)
          Creates a builder with all elements set to the same values as the given CacheDirectiveInfo.
 
Method Summary
 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 Detail

CacheDirectiveInfo.Builder

public CacheDirectiveInfo.Builder()
Creates an empty builder.


CacheDirectiveInfo.Builder

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

Method Detail

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


Copyright © 2014 Apache Software Foundation. All Rights Reserved.