Package org.apache.hadoop.hdfs.protocol
Class CacheDirectiveInfo.Builder
java.lang.Object
org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo.Builder
- Enclosing class:
- CacheDirectiveInfo
A builder for creating new CacheDirectiveInfo instances.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()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 TypeMethodDescriptionbuild()Builds a new CacheDirectiveInfo populated with the set properties.setExpiration(CacheDirectiveInfo.Expiration expiration) Sets when the CacheDirective should expire.Sets the id used in this request.setPath(org.apache.hadoop.fs.Path path) Sets the path used in this request.Sets the pool used in this request.setReplication(Short replication) Sets the replication used in this request.
-
Constructor Details
-
Builder
public Builder()Creates an empty builder. -
Builder
Creates a builder with all elements set to the same values as the given CacheDirectiveInfo.
-
-
Method Details
-
build
Builds a new CacheDirectiveInfo populated with the set properties.- Returns:
- New CacheDirectiveInfo.
-
setId
Sets the id used in this request.- Parameters:
id- The id used in this request.- Returns:
- This builder, for call chaining.
-
setPath
Sets the path used in this request.- Parameters:
path- The path used in this request.- Returns:
- This builder, for call chaining.
-
setReplication
Sets the replication used in this request.- Parameters:
replication- The replication used in this request.- Returns:
- This builder, for call chaining.
-
setPool
Sets the pool used in this request.- Parameters:
pool- The pool used in this request.- Returns:
- This builder, for call chaining.
-
setExpiration
Sets when the CacheDirective should expire. ACacheDirectiveInfo.Expirationcan specify either an absolute or relative expiration time.- Parameters:
expiration- when this CacheDirective should expire- Returns:
- This builder, for call chaining
-