Class ObjectMetadata
- java.lang.Object
-
- org.apache.druid.indexing.overlord.ObjectMetadata
-
- All Implemented Interfaces:
DataSourceMetadata
public final class ObjectMetadata extends Object implements DataSourceMetadata
-
-
Constructor Summary
Constructors Constructor Description ObjectMetadata(Object theObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourceMetadataasStartMetadata()As inIndexerMetadataStorageCoordinator.commitSegments(java.util.Set<org.apache.druid.timeline.DataSegment>), this class can represent start and end of a sequence.booleanequals(Object o)ObjectgetObject()inthashCode()booleanisValidStart()Returns true if this instance should be considered a valid starting point for a new dataSource that has no existing metadata.booleanmatches(DataSourceMetadata other)Returns true if any information present in this instance matches analogous information from "other" and so they are conflict-free.DataSourceMetadataminus(DataSourceMetadata other)Returns a copy of this instance with "other" subtracted.DataSourceMetadataplus(DataSourceMetadata other)Returns a copy of this instance with "other" merged in.StringtoString()
-
-
-
Constructor Detail
-
ObjectMetadata
public ObjectMetadata(Object theObject)
-
-
Method Detail
-
getObject
public Object getObject()
-
isValidStart
public boolean isValidStart()
Description copied from interface:DataSourceMetadataReturns true if this instance should be considered a valid starting point for a new dataSource that has no existing metadata.- Specified by:
isValidStartin interfaceDataSourceMetadata
-
asStartMetadata
public DataSourceMetadata asStartMetadata()
Description copied from interface:DataSourceMetadataAs inIndexerMetadataStorageCoordinator.commitSegments(java.util.Set<org.apache.druid.timeline.DataSegment>), this class can represent start and end of a sequence. This method converts itself into the one for start of a sequence. Most implementations can simply returnthis.- Specified by:
asStartMetadatain interfaceDataSourceMetadata
-
matches
public boolean matches(DataSourceMetadata other)
Description copied from interface:DataSourceMetadataReturns true if any information present in this instance matches analogous information from "other" and so they are conflict-free. In other words, "one.plus(two)" and "two.plus(one)" should return equal instances if "one" matches "two". One simple way to implement this is to make it the same as "equals", although that doesn't allow for partitioned metadata. Behavior is undefined if you pass in an instance of a different class from this one.- Specified by:
matchesin interfaceDataSourceMetadata- Parameters:
other- another instance- Returns:
- true or false
-
plus
public DataSourceMetadata plus(DataSourceMetadata other)
Description copied from interface:DataSourceMetadataReturns a copy of this instance with "other" merged in. Any conflicts should be resolved in favor of information from "other". Behavior is undefined if you pass in an instance of a different class from this one.- Specified by:
plusin interfaceDataSourceMetadata- Parameters:
other- another instance- Returns:
- merged copy
-
minus
public DataSourceMetadata minus(DataSourceMetadata other)
Description copied from interface:DataSourceMetadataReturns a copy of this instance with "other" subtracted. Behavior is undefined if you pass in an instance of a different class from this one.- Specified by:
minusin interfaceDataSourceMetadata- Parameters:
other- another instance- Returns:
- subtracted copy
-
-