GemFire 5.7.1

com.gemstone.gemfire.cache
Class DiskWriteAttributesFactory

java.lang.Object
  extended by com.gemstone.gemfire.cache.DiskWriteAttributesFactory
All Implemented Interfaces:
Serializable

public final class DiskWriteAttributesFactory
extends Object
implements Serializable

Factory for getting DiskWriteAttribute objects

Since:
5.1
See Also:
Serialized Form

Constructor Summary
DiskWriteAttributesFactory()
          Creates a new instance of DiskWriteAttributesFactory ready to create a DiskWriteAttributes with default settings.
DiskWriteAttributesFactory(DiskWriteAttributes dwa)
          Creates a new instance of DiskWriteAttributesFactory Factory ready to create a DiskWriteAttributes with the same settings as those in the specified DiskWriteAttributes.
 
Method Summary
 DiskWriteAttributes create()
          Creates a DiskWriteAttributes with the current settings.
 void setBytesThreshold(long bytesThreshold)
          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.
 void setMaxOplogSize(int maxOplogSize)
          Sets the maximum Oplog size in megabytes after which switching of Oplog will happen
 void setMaxOplogSizeInBytes(long maxOplogSize)
          Sets the maximum Oplog size in bytes after which switching of Oplog will happen
 void setRollOplogs(boolean rollingEnabled)
          Sets whether or not the rolling of Oplog is enabled .
 void setSynchronous(boolean isSynchronous)
          Sets whether or not the writing to the disk is synchronous.
 void setTimeInterval(long timeInterval)
          Sets the number of milliseconds that can elapse before unwritten data is written to disk.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskWriteAttributesFactory

public DiskWriteAttributesFactory()
Creates a new instance of DiskWriteAttributesFactory ready to create a DiskWriteAttributes with default settings. The default DiskWriteAttributes thus created will have following behaviour.


DiskWriteAttributesFactory

public DiskWriteAttributesFactory(DiskWriteAttributes dwa)
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

public void setSynchronous(boolean isSynchronous)
Sets whether or not the writing to the disk is synchronous.

Parameters:
isSynchronous - boolean if true indicates synchronous writes

setRollOplogs

public void setRollOplogs(boolean rollingEnabled)
Sets whether or not the rolling of Oplog is enabled .

Parameters:
rollingEnabled -

setMaxOplogSizeInBytes

public void setMaxOplogSizeInBytes(long maxOplogSize)
Sets the maximum Oplog size in bytes after which switching of Oplog will happen

Parameters:
maxOplogSize -
Throws:
IllegalArgumentException - if the value specified is a negative number

setMaxOplogSize

public void setMaxOplogSize(int maxOplogSize)
Sets the maximum Oplog size in megabytes after which switching of Oplog will happen

Parameters:
maxOplogSize -
Throws:
IllegalArgumentException - if the value specified is a negative number

setTimeInterval

public void setTimeInterval(long timeInterval)
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:
IllegalArgumentException - if the value specified is a negative number

setBytesThreshold

public void setBytesThreshold(long bytesThreshold)
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 -
Throws:
IllegalArgumentException - if the value specified is a negative number

create

public DiskWriteAttributes create()
Creates a DiskWriteAttributes with the current settings.

Returns:
the newly created DiskWriteAttributes
Throws:
IllegalStateException - if the current settings has rolling enabled with maximum Oplog Size specified as infinite ( represented by 0 ) *
Since:
5.1

GemFire 5.7.1

Copyright © 2002-2008 GemStone Systems, Inc. All Rights Reserved.