Class StorageLocation


  • public final class StorageLocation
    extends MgrObject<StorageLocationID>
    This class represents the information of a StorageLocation.
    • Constructor Detail

      • StorageLocation

        public StorageLocation()
        Empty constructor of the StorageLocation
      • StorageLocation

        public StorageLocation​(String newhostname,
                               String newname,
                               int newtcpport)
        StorageLocation specification constructor
        Parameters:
        newhostname - Host name of the Storage Location
        newname - Name of the Storage Location
        newtcpport - TCP Port of the Storage Location
    • Method Detail

      • getHostname

        public String getHostname()
        Get the StorageLocation::hostname
        Returns:
        the hostname
      • setHostname

        public void setHostname​(String newhostname)
        Set the StorageLocation::hostname
        Parameters:
        newhostname - the hostname to set
      • getName

        public String getName()
        Get the StorageLocation::name
        Returns:
        the name
      • setName

        public void setName​(String newname)
        Set the StorageLocation::name
        Parameters:
        newname - the name to set
      • getStorageTCPPort

        public int getStorageTCPPort()
        Get the StorageLocation::storageTCPPort
        Returns:
        the port
      • setStorageTCPPort

        public void setStorageTCPPort​(int newstoragePort)
        Set the StorageLocation::storageTCPPort
        Parameters:
        newstoragePort - the port to set
      • equals

        public boolean equals​(Object t)
        This operation allows to compare this object with other object.
        Overrides:
        equals in class Object
        Parameters:
        t - Object to compare
        Returns:
        If the object is the same, returns TRUE. FALSE, otherwise.
      • hashCode

        public int hashCode()
        This operation allows to compare with other Object by setting its Java default Hashcode to a constant. It is necessary to override the equality function.
        Overrides:
        hashCode in class Object
        Returns:
        the hashcode