Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
chunk: Add config value to disable storage capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Nothaas committed Oct 5, 2018
1 parent 5d5f18c commit f1b960d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private int detectNodeCapabilities() {

int capabilities = 0;

if (chunkConfig.getKeyValueStoreSize().getBytes() > 0L) {
if (chunkConfig.isChunkStorageEnabled()) {
capabilities |= NodeCapabilities.STORAGE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public class ChunkComponentConfig extends DXRAMComponentConfig {
@Expose
private boolean m_chunkLockDisabled = false;

/**
* Enable/disable the chunk storage. A peer with disabled chunk storage is no longer considered a storage peer.
*/
@Expose
private boolean m_chunkStorageEnabled = true;

@Override
protected boolean verify(final DXRAMContext.Config p_config) {
if (m_keyValueStoreSize.getBytes() < KEY_VALUE_STORE_SIZE_MIN.getBytes()) {
Expand Down

0 comments on commit f1b960d

Please sign in to comment.