HCOLL-360 Update to the latest chronicle-bom

This commit is contained in:
leventov
2015-08-04 23:01:53 +03:00
parent ff99f5cccd
commit 3729ee3768
4 changed files with 101 additions and 4 deletions
@@ -42,8 +42,8 @@ public class JavaLangBytesReusableBytesStore
}
@Override
public long address() throws UnsupportedOperationException {
return bytes.address();
public long address(long offset) throws UnsupportedOperationException {
return bytes.address() + offset;
}
@Override
@@ -17,7 +17,6 @@
package net.openhft.chronicle.map.impl.stage.data;
import net.openhft.chronicle.bytes.RandomDataInput;
import net.openhft.chronicle.bytes.ZeroRandomDataInput;
import net.openhft.chronicle.hash.AbstractData;
import net.openhft.chronicle.map.impl.VanillaChronicleMapHolder;
import net.openhft.sg.StageRef;
@@ -0,0 +1,98 @@
/*
* 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.impl.stage.data;
import net.openhft.chronicle.bytes.Bytes;
import net.openhft.chronicle.bytes.RandomDataInput;
import net.openhft.chronicle.core.OS;
public enum ZeroRandomDataInput implements RandomDataInput {
INSTANCE;
@Override
public byte readByte(long offset) {
return 0;
}
@Override
public short readShort(long offset) {
return 0;
}
@Override
public int readInt(long offset) {
return 0;
}
@Override
public long readLong(long offset) {
return 0;
}
@Override
public float readFloat(long offset) {
return 0;
}
@Override
public double readDouble(long offset) {
return 0;
}
@Override
public void nativeRead(long position, long address, long size) {
OS.memory().setMemory(address, size, (byte) 0);
}
@Override
public long realCapacity() {
return Long.MAX_VALUE;
}
@Override
public long capacity() {
return Long.MAX_VALUE;
}
@Override
public long address(long offset) throws UnsupportedOperationException {
return offset;
}
@Override
public Bytes bytesForRead() {
throw new UnsupportedOperationException();
}
@Override
public Bytes bytesForWrite() {
throw new UnsupportedOperationException();
}
@Override
public void reserve() throws IllegalStateException {
}
@Override
public void release() throws IllegalStateException {
}
@Override
public long refCount() {
return 0;
}
}