Class CollectedClaimsImpl
java.lang.Object
com.illumon.iris.db.v2.routing.impl.yaml.CollectedClaimsImpl
- All Implemented Interfaces:
CollectedClaims
Implementation of CollectedClaims. Stores the data in maps, and adds methods for building up the collection.
This implementation stays mutable, add synchronization externally as necessary.
-
Field Summary
Fields inherited from interface com.illumon.iris.db.v2.routing.filter.claims.CollectedClaims
EMPTY, UNKNOWN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Register the namespace to the claimant.void
Register the table to the claimant.claimedBy
(CharSequence namespace, CharSequence tableName) return the name of the DIS or failover group that has claim on this table, or null if none.boolean
Get the set of claimed namespaces.Get the set of claimed tables.int
hashCode()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.v2.routing.filter.claims.CollectedClaims
claimedBy, claimedBy, claimedBy, claimedBy, getClaimsFilter, getIfUnclaimedFilter, getIfUnclaimedFilter
-
Constructor Details
-
CollectedClaimsImpl
public CollectedClaimsImpl()
-
-
Method Details
-
getNamespaceClaims
Description copied from interface:CollectedClaims
Get the set of claimed namespaces. This is entire namespaces that have been claimed, but individual claims on a table in the namespace will override the claim for that table.- Specified by:
getNamespaceClaims
in interfaceCollectedClaims
- Returns:
- map of namespace to claimant
-
getTableClaims
Description copied from interface:CollectedClaims
Get the set of claimed tables.- Specified by:
getTableClaims
in interfaceCollectedClaims
- Returns:
- map of namespace to (map of table to claimant)
-
claim
Register the table to the claimant.- Parameters:
claimant
- who is claiming this tablenamespace
- namespace of the table being claimedtableName
- table to claim
-
claim
Register the namespace to the claimant.- Parameters:
claimant
- who is claiming this tablenamespace
- namespace to claim
-
claimedBy
return the name of the DIS or failover group that has claim on this table, or null if none.- Specified by:
claimedBy
in interfaceCollectedClaims
- Parameters:
namespace
- namespace of the table to be checkedtableName
- name of the table to be checked- Returns:
- the name of the DIS or failover group that has claimed this table, null if no claim
-
equals
-
hashCode
public int hashCode() -
toString
-