Class MultitenantKey<T>

  • Type Parameters:
    T - the type of object being stored in the Context.
    All Implemented Interfaces:
    Context.Key<T>

    public final class MultitenantKey<T>
    extends java.lang.Object
    implements Context.Key<T>
    Implementation of Context.Key suitable for use with multi-tenancy. In a multi-tenant environment, anything we store in the Vert.x context is keyed not only by its type, but also by the tenant id.

    An instance of this class wraps a BaseKey of the same type, allowing instance reuse for efficiency.

    • Constructor Summary

      Constructors 
      Constructor Description
      MultitenantKey​(BaseKey<T> base, java.lang.String tenantId)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultitenantKey

        public MultitenantKey​(BaseKey<T> base,
                              java.lang.String tenantId)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object