mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Reduce ChronicleMapBuilder API surface, hide private API in a class
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (C) 2015 higherfrequencytrading.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import net.openhft.chronicle.hash.ChronicleHashBuilderPrivateAPI;
|
||||
import net.openhft.chronicle.hash.serialization.internal.SerializationBuilder;
|
||||
|
||||
class ChronicleMapBuilderPrivateAPI<K> implements ChronicleHashBuilderPrivateAPI<K> {
|
||||
|
||||
private ChronicleMapBuilder<K, ?> b;
|
||||
|
||||
public ChronicleMapBuilderPrivateAPI(ChronicleMapBuilder<K, ?> b) {
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SerializationBuilder<K> keyBuilder() {
|
||||
return b.keyBuilder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int segmentEntrySpaceInnerOffset(boolean replicated) {
|
||||
return b.segmentEntrySpaceInnerOffset(replicated);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long chunkSize(boolean replicated) {
|
||||
return b.chunkSize(replicated);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxChunksPerEntry(boolean replicated) {
|
||||
return b.maxChunksPerEntry(replicated);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long entriesPerSegment(boolean replicated) {
|
||||
return b.entriesPerSegment(replicated);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long actualChunksPerSegment(boolean replicated) {
|
||||
return b.actualChunksPerSegment(replicated);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int segmentHeaderSize(boolean replicated) {
|
||||
return b.segmentHeaderSize(replicated);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int actualSegments(boolean replicated) {
|
||||
return b.actualSegments(replicated);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user