HCOLL-197 - added better support for buffer resize to prevent issues around Integer.MAX_SIZE

This commit is contained in:
Rob Austin
2014-12-19 12:21:55 +00:00
parent 80c37e38f0
commit a47f177710
5 changed files with 138 additions and 32 deletions
@@ -97,6 +97,18 @@ final class ChannelProvider implements Closeable {
}
}
@Override
public boolean identifierCheck(@NotNull Bytes entry, int chronicleChannel) {
channelDataLock.readLock().lock();
try {
return channelEntryExternalizables[chronicleChannel]
.identifierCheck(entry, chronicleChannel);
} finally {
channelDataLock.readLock().unlock();
}
}
/**
* writes the entry to the chronicle channel provided
*
@@ -484,6 +496,11 @@ final class ChannelProvider implements Closeable {
return (int) entry.remaining();
}
@Override
public boolean identifierCheck(@NotNull Bytes entry, int chronicleId) {
return true;
}
@Override
public void writeExternalEntry(@NotNull Bytes entry, @NotNull Bytes destination,
int na) {