Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.2)

E26043-01


com.tangosol.io.journal
Class AbstractJournalRM.DefaultDependencies

java.lang.Object
  extended by com.tangosol.io.journal.AbstractJournalRM.DefaultDependencies

All Implemented Interfaces:
AbstractJournalRM.Dependencies
Direct Known Subclasses:
FlashJournalRM.DefaultDependencies, RamJournalRM.DefaultDependencies
Enclosing class:
AbstractJournalRM

public abstract static class AbstractJournalRM.DefaultDependencies
extends java.lang.Object
implements AbstractJournalRM.Dependencies

The DefaultDependencies class provides a default implementation of Dependencies.


Field Summary
protected  long m_cbMaxFile
          Maximum size for any of the journal files (maximum-file-size).
protected  int m_cbMaxValue
          Configurable maximum value size (maximum-value-size).
protected  double m_dflLoadFactorGC
          The percentage (as a double in the range 0.01 to 0.99) at which a file is eligible for garbage collection (minimum-load-factor).
static double MAX_COLLECT_PCT
          Maximum collection factor (0.99, i.e. files that are still almost full).
static int MAX_FILE_COUNT
          Maximum file count for a Journal (512).
static double MIN_COLLECT_PCT
          Minimum collection factor (0.01, i.e. files that are only 1% utilized).

 

Constructor Summary
AbstractJournalRM.DefaultDependencies()
          Construct a DefaultDependencies object.
AbstractJournalRM.DefaultDependencies(AbstractJournalRM.Dependencies deps)
          Construct a DefaultDependencies object.

 

Method Summary
 double getCollectorLoadFactor()
          Return the load factor threshold at which files become eligible for garbage collection (compaction).
protected abstract  double getDefaultCollectorLoadFactor()
          Get the default percentage at which a file is eligible for garbage collection.
protected abstract  long getDefaultMaxFileSize()
          Get the default maximum file size for this Journal Resource Manager.
protected abstract  int getDefaultMaxValueSize()
          Get the default maximum value size for this Journal Resource Manager.
 long getMaxFileSize()
          Return the maximum allowable size, in bytes, of each individual file used to hold Journal data.
 int getMaxValueSize()
          Return the maximum allowable size, in bytes, of a Binary value.
 AbstractJournalRM.DefaultDependencies setCollectorLoadFactor(double dflFactor)
          Set the use-percentage of file below which it becomes eligible for garbage collection.
 AbstractJournalRM.DefaultDependencies setMaxFileSize(long maxFileSize)
          Set the maximum size of the underlying journal files.
 AbstractJournalRM.DefaultDependencies setMaxValueSize(int valueSize)
          Set the maximum size, in bytes, of Binary values to store.
 java.lang.String toString()
          Return the DefautlDependencies in String format.
 AbstractJournalRM.Dependencies validate()
          Validate the supplied dependencies.
protected  void validateLoadFactor()
          Validate the minimum-load-factor.

 

Field Detail

MIN_COLLECT_PCT

public static final double MIN_COLLECT_PCT
Minimum collection factor (0.01, i.e. files that are only 1% utilized).
See Also:
Constant Field Values

MAX_COLLECT_PCT

public static final double MAX_COLLECT_PCT
Maximum collection factor (0.99, i.e. files that are still almost full).
See Also:
Constant Field Values

MAX_FILE_COUNT

public static final int MAX_FILE_COUNT
Maximum file count for a Journal (512).
See Also:
Constant Field Values

m_cbMaxValue

protected int m_cbMaxValue
Configurable maximum value size (maximum-value-size).

m_cbMaxFile

protected long m_cbMaxFile
Maximum size for any of the journal files (maximum-file-size).

m_dflLoadFactorGC

protected double m_dflLoadFactorGC
The percentage (as a double in the range 0.01 to 0.99) at which a file is eligible for garbage collection (minimum-load-factor).

Constructor Detail

AbstractJournalRM.DefaultDependencies

public AbstractJournalRM.DefaultDependencies()
Construct a DefaultDependencies object.

AbstractJournalRM.DefaultDependencies

public AbstractJournalRM.DefaultDependencies(AbstractJournalRM.Dependencies deps)
Construct a DefaultDependencies object. Copy the values from the specified Dependencies object.
Parameters:
deps - the dependencies to copy, or null

Method Detail

getDefaultMaxFileSize

protected abstract long getDefaultMaxFileSize()
Get the default maximum file size for this Journal Resource Manager.
Returns:
the default maximum file size

getDefaultMaxValueSize

protected abstract int getDefaultMaxValueSize()
Get the default maximum value size for this Journal Resource Manager.
Returns:
the default maximum value size

getDefaultCollectorLoadFactor

protected abstract double getDefaultCollectorLoadFactor()
Get the default percentage at which a file is eligible for garbage collection.
Returns:
the default garbage collection load factor

getMaxValueSize

public int getMaxValueSize()
Return the maximum allowable size, in bytes, of a Binary value.
Specified by:
getMaxValueSize in interface AbstractJournalRM.Dependencies
Returns:
the maximum allowable size for a value to write

setMaxValueSize

public AbstractJournalRM.DefaultDependencies setMaxValueSize(int valueSize)
Set the maximum size, in bytes, of Binary values to store.
Parameters:
valueSize - the maximum allowable size for a Binary value, or zero to specify no configured maximum for the value size
Returns:
this object

getMaxFileSize

public long getMaxFileSize()
Return the maximum allowable size, in bytes, of each individual file used to hold Journal data. This is not the total size limit of the Journal, since the Journal may use a number of files to store its data.
Specified by:
getMaxFileSize in interface AbstractJournalRM.Dependencies
Returns:
the maximum allowable size for an underlying file

setMaxFileSize

public AbstractJournalRM.DefaultDependencies setMaxFileSize(long maxFileSize)
Set the maximum size of the underlying journal files.
Parameters:
maxFileSize - the maximum size, in bytes, for journal files
Returns:
this object

getCollectorLoadFactor

public double getCollectorLoadFactor()
Return the load factor threshold at which files become eligible for garbage collection (compaction). The load factor threshold is the ratio between the portion of the file used for live data and the total size of the file, and is expressed as a double value in the interval (0.0, 1.0).

When the portion of released data exceeds (1 - threshold), the file becomes eligible for compaction (garbage collection).

Specified by:
getCollectorLoadFactor in interface AbstractJournalRM.Dependencies
Returns:
the compaction factor threshold between 0.0 and 1.0

setCollectorLoadFactor

public AbstractJournalRM.DefaultDependencies setCollectorLoadFactor(double dflFactor)
Set the use-percentage of file below which it becomes eligible for garbage collection. The minimum is defined by MIN_COLLECT_PCT and a maximum defined by MAX_COLLECT_PCT. Setting the value higher means that disk space will be collected more aggressively, but the cost of collection will be significantly higher, while setting the value lower will use more disk space.
Parameters:
dflFactor - the garbage collector factor in the range 0.01 to 0.99
Returns:
this object

validate

public AbstractJournalRM.Dependencies validate()
Validate the supplied dependencies.
Returns:
this object
Throws:
java.lang.IllegalArgumentException - if the dependencies are not valid

toString

public java.lang.String toString()
Return the DefautlDependencies in String format.
Returns:
the DefautlDependencies in String format

validateLoadFactor

protected void validateLoadFactor()
Validate the minimum-load-factor.

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.2)

E26043-01


Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.