Class FormerIndex
- java.lang.Object
-
- com.apple.foundationdb.record.metadata.FormerIndex
-
@API(MAINTAINED) public class FormerIndex extends Object
The location where a deleted index used to live. Nothing is remembered about the index other than this, so that the now-unused range can be deleted when an older record store is upgraded to newer meta-data.
-
-
Constructor Summary
Constructors Constructor Description FormerIndex(RecordMetaDataProto.FormerIndex proto)
FormerIndex(Object subspaceKey, int addedVersion, int removedVersion, String formerName)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
int
getAddedVersion()
Get the version at which the index was first added.String
getFormerName()
Get the name under which the index existed, if known.int
getRemovedVersion()
Get the version at which the index was removed.Object
getSubspaceKey()
Get the subspace key formerly occupied by the index.Object
getSubspaceTupleKey()
Get aTuple
-encodable version of the subspace key formerly occupied by the index.int
getVersion()
Deprecated.int
hashCode()
RecordMetaDataProto.FormerIndex
toProto()
String
toString()
-
-
-
Method Detail
-
getSubspaceKey
@Nonnull public Object getSubspaceKey()
Get the subspace key formerly occupied by the index. This subspace will be cleared for record stores old enough to have seen the index.- Returns:
- the index subspace key
-
getSubspaceTupleKey
@Nonnull public Object getSubspaceTupleKey()
Get aTuple
-encodable version of the subspace key formerly occupied by the index. As the subspace key is not guaranteed to be of aTuple
-encodable type on its own, this method is preferred overgetSubspaceKey()
if one is constructing a key to read or write data from the database.- Returns:
- a
Tuple
-encodable version of index subspace key
-
getVersion
@Deprecated public int getVersion()
Deprecated.Synonym forgetRemovedVersion()
.- Returns:
- the removed version
-
getAddedVersion
public int getAddedVersion()
Get the version at which the index was first added.- Returns:
- the added version
-
getRemovedVersion
public int getRemovedVersion()
Get the version at which the index was removed.- Returns:
- the removed version
-
getFormerName
@Nullable public String getFormerName()
Get the name under which the index existed, if known.- Returns:
- the former name
-
toProto
@Nonnull public RecordMetaDataProto.FormerIndex toProto()
-
-