Class DiskWriteAttributesFactory

  • java.lang.Object
    • org.apache.geode.cache.DiskWriteAttributesFactory
  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated
    public class DiskWriteAttributesFactory
    extends java.lang.Object
    implements java.io.Serializable
    Deprecated.
    as of 6.5 use DiskStoreFactory instead
    Factory for getting DiskWriteAttribute objects
    Since:
    GemFire 5.1
    See Also:
    Serialized Form
    • Constructor Detail

      • DiskWriteAttributesFactory

        public DiskWriteAttributesFactory()
        Deprecated.
        Creates a new instance of DiskWriteAttributesFactory ready to create a DiskWriteAttributes with default settings. The default DiskWriteAttributes thus created will have following behaviour.
        • synchronous = false
        • auto-compact = true
        • allow-force-compaction = false
        • max-oplog-size = 1024 MB
        • time-interval = 1 sec
        • byte-threshold = 0 bytes
      • DiskWriteAttributesFactory

        public DiskWriteAttributesFactory​(DiskWriteAttributes dwa)
        Deprecated.
        Creates a new instance of DiskWriteAttributesFactory Factory ready to create a DiskWriteAttributes with the same settings as those in the specified DiskWriteAttributes.
        Parameters:
        dwa - the DiskWriteAttributes used to initialize this DiskWriteAttributesFactory
    • Method Detail

      • setSynchronous

        @Deprecated
        public void setSynchronous​(boolean isSynchronous)
        Deprecated.
        Sets whether or not the writing to the disk is synchronous.
        Parameters:
        isSynchronous - boolean if true indicates synchronous writes
      • setRollOplogs

        @Deprecated
        public void setRollOplogs​(boolean rollingEnabled)
        Deprecated.
        Sets whether or not the rolling of Oplog is enabled .
        Parameters:
        rollingEnabled - true if oplogs are to be compacted automatically; false if no compaction.
      • setCompactionThreshold

        @Deprecated
        public void setCompactionThreshold​(int compactionThreshold)
        Deprecated.
        Sets the threshold at which an oplog will become compactable. While the percentage of live records in the oplog exceeds this threshold the oplog will not be compacted. Once the percentage of live is less than or equal to the threshold the oplog can be compacted. The lower the threshold the longer the compactor will wait before compacting an oplog. The threshold is a percentage in the range 0..100. The default is 50%.

        Examples: A threshold of 100 causes any oplog that is no longer being written to to be compactable. A threshold of 0 causes only oplogs that have no live records to be compactable in which case the compact can simply remove the oplog file. A threshold of 50 causes an oplog to become compactable when half of its live records become dead.

        Parameters:
        compactionThreshold - the threshold at which an oplog will become compactable
      • setMaxOplogSizeInBytes

        @Deprecated
        public void setMaxOplogSizeInBytes​(long maxOplogSize)
        Deprecated.
        Sets the maximum oplog size in bytes. When the active oplog size hits the maximum a new oplog will be created.

        Note that this method sets the same attribute as setMaxOplogSize(int). The last set of the attribute determines its value.

        Parameters:
        maxOplogSize - the maximum size of the oplog in bytes.
        Throws:
        java.lang.IllegalArgumentException - if the value specified is a negative number
      • setMaxOplogSize

        @Deprecated
        public void setMaxOplogSize​(int maxOplogSize)
        Deprecated.
        Sets the maximum oplog size in megabytes. When the active oplog size hits the maximum a new oplog will be created.

        Note that this method sets the same attribute as setMaxOplogSizeInBytes(long). The last set of the attribute determines its value.

        Parameters:
        maxOplogSize - the maximum size of the oplog in megabytes.
        Throws:
        java.lang.IllegalArgumentException - if the value specified is a negative number
      • setTimeInterval

        @Deprecated
        public void setTimeInterval​(long timeInterval)
        Deprecated.
        Sets the number of milliseconds that can elapse before unwritten data is written to disk. It has significance only in case of asynchronous mode of writing.
        Parameters:
        timeInterval - Time interval in milliseconds
        Throws:
        java.lang.IllegalArgumentException - if the value specified is a negative number
      • setBytesThreshold

        @Deprecated
        public void setBytesThreshold​(long bytesThreshold)
        Deprecated.
        Sets the number of unwritten bytes of data that can be enqueued before being written to disk. It has significance only in case of asynchronous mode of writing.
        Parameters:
        bytesThreshold - the maximum number of bytes to enqueue before async data is flushed.
        Throws:
        java.lang.IllegalArgumentException - if the value specified is a negative number
      • create

        @Deprecated
        public DiskWriteAttributes create()
        Deprecated.
        Creates a DiskWriteAttributes with the current settings.
        Returns:
        the newly created DiskWriteAttributes
        Throws:
        java.lang.IllegalStateException - if the current settings has compaction enabled with maximum Oplog Size specified as infinite ( represented by 0 ) *
        Since:
        GemFire 5.1