public class StorageKey extends Marker implements Comparable<StorageKey>
| Modifier and Type | Class and Description |
|---|---|
static class |
StorageKey.Builder
A fluent
Builder for creating a StorageKey. |
| Constructor and Description |
|---|
StorageKey(PartitionStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(StorageKey other) |
static StorageKey |
copy(StorageKey toCopy)
A convenience method to make a copy of a
StorageKey. |
boolean |
equals(Object obj) |
Object |
get(int index)
Returns the value for
index. |
Object |
get(String name)
Returns the value for
name. |
PartitionStrategy |
getPartitionStrategy() |
Path |
getPath() |
boolean |
has(String name)
Returns whether
name is stored in this Marker. |
int |
hashCode() |
void |
replace(int index,
Object value)
Replaces the value at
index with the given value. |
void |
replaceValues(List<Object> values)
Replaces all of the values in this
StorageKey with the given List. |
<E> StorageKey |
reuseFor(E entity,
EntityAccessor<E> accessor)
Replaces all of the values in this
StorageKey with values from the given
entity. |
<E> StorageKey |
reuseFor(E entity,
Map<String,Object> provided,
EntityAccessor<E> accessor)
Replaces all of the values in this
StorageKey with values from the given
entity. |
StorageKey |
reuseFor(List<String> dirs,
org.kitesdk.data.spi.filesystem.PathConversion conversion) |
StorageKey |
reuseFor(Path path,
org.kitesdk.data.spi.filesystem.PathConversion conversion) |
String |
toString() |
public StorageKey(PartitionStrategy strategy)
public PartitionStrategy getPartitionStrategy()
public Path getPath()
public boolean has(String name)
Markername is stored in this Marker.public Object get(String name)
Markername.public Object get(int index)
index.index - the index of the value to returnindexpublic void replace(int index,
Object value)
index with the given value.index - the index of the field to replacevalue - an Object to store at indexpublic void replaceValues(List<Object> values)
StorageKey with the given List.values - a List of valuespublic <E> StorageKey reuseFor(E entity, EntityAccessor<E> accessor)
StorageKey with values from the given
entity.entity - an entity to reuse this StorageKey forStorageKeyIllegalStateException - If the entity cannot be used to produce a value for each
field in the PartitionStrategypublic <E> StorageKey reuseFor(E entity, @Nullable Map<String,Object> provided, EntityAccessor<E> accessor)
StorageKey with values from the given
entity.entity - an entity to reuse this StorageKey forStorageKeyIllegalStateException - If the entity cannot be used to produce a value for each
field in the PartitionStrategypublic StorageKey reuseFor(List<String> dirs, org.kitesdk.data.spi.filesystem.PathConversion conversion)
public StorageKey reuseFor(Path path, org.kitesdk.data.spi.filesystem.PathConversion conversion)
public int compareTo(StorageKey other)
compareTo in interface Comparable<StorageKey>public static StorageKey copy(StorageKey toCopy)
StorageKey.
This is not a deep copy.toCopy - a StorageKey to copyPartitionStrategy and contentCopyright © 2013–2015. All rights reserved.