Java Code Examples for org.elasticsearch.index.translog.Translog#Durability

The following examples show how to use org.elasticsearch.index.translog.Translog#Durability . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IndexService.java    From crate with Apache License 2.0 5 votes vote down vote up
private void rescheduleFsyncTask(Translog.Durability durability) {
    try {
        if (fsyncTask != null) {
            fsyncTask.close();
        }
    } finally {
        fsyncTask = durability == Translog.Durability.REQUEST ? null : new AsyncTranslogFSync(this);
    }
}
 
Example 2
Source File: IndexSettings.java    From crate with Apache License 2.0 4 votes vote down vote up
/**
 * Returns the translog durability for this index.
 */
public Translog.Durability getTranslogDurability() {
    return durability;
}
 
Example 3
Source File: IndexSettings.java    From crate with Apache License 2.0 4 votes vote down vote up
private void setTranslogDurability(Translog.Durability durability) {
    this.durability = durability;
}
 
Example 4
Source File: IndexShard.java    From crate with Apache License 2.0 4 votes vote down vote up
/**
 * Returns the current translog durability mode
 */
public Translog.Durability getTranslogDurability() {
    return indexSettings.getTranslogDurability();
}