mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-197 - added better support for buffer resize to prevent issues around Integer.MAX_SIZE
This commit is contained in:
@@ -128,12 +128,25 @@ interface Replica extends Closeable {
|
||||
interface EntryExternalizable {
|
||||
|
||||
/**
|
||||
* @param entry an entry in the map
|
||||
* @param chronicleId is the channel id used to identify the canonical map or queue
|
||||
* The size of entry in bytes
|
||||
*
|
||||
* @param entry an entry in the map
|
||||
* @param chronicleId is the channel id used to identify the canonical map or queue
|
||||
* @return the size of the entry
|
||||
*/
|
||||
int sizeOfEntry(@NotNull Bytes entry, int chronicleId);
|
||||
|
||||
|
||||
/**
|
||||
* check that the identifier in the entry is from this node
|
||||
*
|
||||
* @param entry an entry in the map
|
||||
* @param chronicleId is the channel id used to identify the canonical map or queue
|
||||
* @return the size of the entry
|
||||
*/
|
||||
boolean identifierCheck(@NotNull Bytes entry, int chronicleId);
|
||||
|
||||
|
||||
/**
|
||||
* The map implements this method to save its contents.
|
||||
*
|
||||
@@ -160,6 +173,8 @@ interface Replica extends Closeable {
|
||||
void readExternalEntry(
|
||||
@NotNull ThreadLocalCopies copies,
|
||||
@NotNull VanillaChronicleMap.SegmentState segmentState, @NotNull Bytes source);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,6 +233,21 @@ interface Replica extends Closeable {
|
||||
*/
|
||||
public void onBeforeEntry() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* its possible that the entry should now be ignored, for example although rare its
|
||||
* identifier may have recently been changed by another thread, so its no longer applicable
|
||||
* to send
|
||||
*
|
||||
* @param entry the entry you will receive, this does not have to be locked, as
|
||||
* locking is already provided from the caller.
|
||||
* @param chronicleId only assigned when clustering
|
||||
* @return {@code true} if this entry should be ignored
|
||||
*/
|
||||
public abstract boolean shouldBeIgnored(final Bytes entry, final int chronicleId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user