Class Datafile.Builder

  • Enclosing class:
    Datafile

    public static class Datafile.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        public Datafile.Builder name​(String name)
        The filename (including the path) of the data file or temp file.
        Parameters:
        name - the value to set
        Returns:
        this builder
      • status

        public Datafile.Builder status​(Datafile.Status status)
        The status of the file.

        INVALID status is used when the file number is not in use, for example, a file in a tablespace that was removed.

        Parameters:
        status - the value to set
        Returns:
        this builder
      • onlineStatus

        public Datafile.Builder onlineStatus​(Datafile.OnlineStatus onlineStatus)
        The online status of the file.
        Parameters:
        onlineStatus - the value to set
        Returns:
        this builder
      • isAutoExtensible

        public Datafile.Builder isAutoExtensible​(Boolean isAutoExtensible)
        Indicates whether the data file is auto-extensible.
        Parameters:
        isAutoExtensible - the value to set
        Returns:
        this builder
      • lostWriteProtect

        public Datafile.Builder lostWriteProtect​(Datafile.LostWriteProtect lostWriteProtect)
        The lost write protection status of the file.
        Parameters:
        lostWriteProtect - the value to set
        Returns:
        this builder
      • shared

        public Datafile.Builder shared​(Datafile.Shared shared)
        Type of tablespace this file belongs to.

        If it’s for a shared tablespace, for a local temporary tablespace for RIM (read-only) instances, or for local temporary tablespace for all instance types.

        Parameters:
        shared - the value to set
        Returns:
        this builder
      • instanceId

        public Datafile.Builder instanceId​(BigDecimal instanceId)
        Instance ID of the instance to which the temp file belongs.

        This column has a NULL value for temp files that belong to shared tablespaces.

        Parameters:
        instanceId - the value to set
        Returns:
        this builder
      • maxSizeKB

        public Datafile.Builder maxSizeKB​(BigDecimal maxSizeKB)
        The maximum file size in KB.
        Parameters:
        maxSizeKB - the value to set
        Returns:
        this builder
      • allocatedSizeKB

        public Datafile.Builder allocatedSizeKB​(BigDecimal allocatedSizeKB)
        The allocated file size in KB.
        Parameters:
        allocatedSizeKB - the value to set
        Returns:
        this builder
      • userSizeKB

        public Datafile.Builder userSizeKB​(BigDecimal userSizeKB)
        The size of the file available for user data in KB.

        The actual size of the file minus the USER_BYTES value is used to store file-related metadata.

        Parameters:
        userSizeKB - the value to set
        Returns:
        this builder
      • incrementBy

        public Datafile.Builder incrementBy​(BigDecimal incrementBy)
        The number of blocks used as auto-extension increment.
        Parameters:
        incrementBy - the value to set
        Returns:
        this builder
      • freeSpaceKB

        public Datafile.Builder freeSpaceKB​(BigDecimal freeSpaceKB)
        The free space available in the data file in KB.
        Parameters:
        freeSpaceKB - the value to set
        Returns:
        this builder
      • usedSpaceKB

        public Datafile.Builder usedSpaceKB​(BigDecimal usedSpaceKB)
        The total space used in the data file in KB.
        Parameters:
        usedSpaceKB - the value to set
        Returns:
        this builder
      • usedPercentAvailable

        public Datafile.Builder usedPercentAvailable​(Double usedPercentAvailable)
        The percentage of used space out of the maximum available space in the file.
        Parameters:
        usedPercentAvailable - the value to set
        Returns:
        this builder
      • usedPercentAllocated

        public Datafile.Builder usedPercentAllocated​(Double usedPercentAllocated)
        The percentage of used space out of the total allocated space in the file.
        Parameters:
        usedPercentAllocated - the value to set
        Returns:
        this builder