Interface DistributedObject

    • Method Detail

      • getPartitionKey

        java.lang.String getPartitionKey()
        Returns the key of the partition that this DistributedObject is assigned to. The returned value only has meaning for a non-partitioned data structure like an IAtomicLong. For a partitioned data structure like an IMap, the returned value will not be null, but otherwise undefined.
        Returns:
        the partition key.
      • getServiceName

        java.lang.String getServiceName()
        Returns the service name for this object.
        Returns:
        the service name for this object.
      • destroy

        void destroy()
        Destroys this object cluster-wide. Clears and releases all resources for this object.
      • getDestroyContextForTenant

        @Nonnull
        default DestroyEventContext getDestroyContextForTenant()
        Returns a hook which can be used by tenant control implementation to clean up resources once a tenant is destroyed.

        This hook is used, for example, when a distributed object needs to clear any cached classes related to the destroyed tenant and to avoid class loader leaks and ClassNotFoundExceptions when the tenant is destroyed.

        Returns:
        destroy context, cannot be null