public class ReftableConfig extends Object
Constructor and Description |
---|
ReftableConfig()
Create a default configuration.
|
ReftableConfig(Config cfg)
Create a configuration honoring settings in a
Config . |
ReftableConfig(ReftableConfig cfg)
Copy an existing configuration to a new instance.
|
ReftableConfig(Repository db)
Create a configuration honoring the repository's settings.
|
Modifier and Type | Method and Description |
---|---|
void |
fromConfig(Config rc)
Update properties by setting fields from the configuration.
|
int |
getLogBlockSize()
Get desired output block size for log entries, in bytes.
|
int |
getMaxIndexLevels()
Get maximum depth of the index; 0 for unlimited.
|
int |
getRefBlockSize()
Get desired output block size for references, in bytes.
|
int |
getRestartInterval()
Get number of references between binary search markers.
|
boolean |
isAlignBlocks()
Whether the writer should align blocks.
|
boolean |
isIndexObjects()
Whether the writer should index object to ref.
|
void |
setAlignBlocks(boolean align)
Whether blocks are written aligned to multiples of
getRefBlockSize() . |
void |
setIndexObjects(boolean index)
Whether the reftable may include additional storage to efficiently map
from
ObjectId to reference names. |
void |
setLogBlockSize(int szBytes)
Set desired output block size for log entries, in bytes.
|
void |
setMaxIndexLevels(int levels)
Set maximum number of levels to use in indexes.
|
void |
setRefBlockSize(int szBytes)
Set desired output block size for references, in bytes.
|
void |
setRestartInterval(int interval)
Setter for the field
restartInterval . |
public ReftableConfig()
public ReftableConfig(Repository db)
db
- the repository to read settings from. The repository is not
retained by the new configuration, instead its settings are
copied during the constructor.public ReftableConfig(Config cfg)
Config
.cfg
- the source to read settings from. The source is not retained
by the new configuration, instead its settings are copied
during the constructor.public ReftableConfig(ReftableConfig cfg)
cfg
- the source configuration to copy from.public int getRefBlockSize()
public void setRefBlockSize(int szBytes)
szBytes
- desired output block size for references, in bytes.public int getLogBlockSize()
2 * getRefBlockSize()
.public void setLogBlockSize(int szBytes)
szBytes
- desired output block size for log entries, in bytes. If 0 will
default to 2 * getRefBlockSize()
.public int getRestartInterval()
public void setRestartInterval(int interval)
Setter for the field restartInterval
.
interval
- number of references between binary search markers. If
interval
is 0 (default), the writer will select a
default value based on the block size.public int getMaxIndexLevels()
public void setMaxIndexLevels(int levels)
levels
- maximum number of levels to use in indexes. Lower levels of
the index respect getRefBlockSize()
, and the highest
level may exceed that if the number of levels is limited.public boolean isAlignBlocks()
true
if the writer should align blocks.public void setAlignBlocks(boolean align)
getRefBlockSize()
.align
- if true
blocks are written aligned to multiples of
getRefBlockSize()
. May increase file size due to NUL
padding bytes added between blocks. Default is true
.public boolean isIndexObjects()
true
if the writer should index object to ref.public void setIndexObjects(boolean index)
ObjectId
to reference names.index
- if true
the reftable may include additional storage to
efficiently map from ObjectId
to reference names. By
default, true
.public void fromConfig(Config rc)
rc
- configuration to read properties from.Copyright © 2017 Eclipse JGit Project. All rights reserved.