mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Great refactoring
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import net.openhft.lang.io.Bytes;
|
||||
import net.openhft.lang.threadlocal.ThreadLocalCopies;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Closeable;
|
||||
@@ -165,14 +164,12 @@ interface Replica extends Closeable {
|
||||
* writeExternalEntry()}. This method is typically called when we receive a remote
|
||||
* replication event, this event could originate from either a remote {@code put(K key, V
|
||||
*value)} or {@code remove(Object key)}
|
||||
*
|
||||
* @param copies
|
||||
* @param segmentState
|
||||
* @param context
|
||||
* @param source bytes to read an entry from
|
||||
*/
|
||||
void readExternalEntry(
|
||||
@NotNull ThreadLocalCopies copies,
|
||||
@NotNull VanillaChronicleMap.SegmentState segmentState, @NotNull Bytes source);
|
||||
@NotNull ReplicatedChronicleMap.BytesReplicatedContext context, @NotNull Bytes source);
|
||||
|
||||
|
||||
}
|
||||
@@ -213,7 +210,7 @@ interface Replica extends Closeable {
|
||||
/**
|
||||
* Called whenever a put() or remove() has occurred to a replicating map.
|
||||
*
|
||||
* @param entry the entry you will receive, this does not have to be locked, as
|
||||
* @param context 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 false} if this entry should be ignored because the identifier of the
|
||||
@@ -223,13 +220,13 @@ interface Replica extends Closeable {
|
||||
public abstract boolean onEntry(final Bytes entry, final int chronicleId);
|
||||
|
||||
/**
|
||||
* Called just after {@link #onEntry(Bytes, int)}. No-op by default.
|
||||
* Called just after {@link #onEntry(VanillaContext, int)}. No-op by default.
|
||||
*/
|
||||
public void onAfterEntry() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called just before {@link #onEntry(Bytes, int)}. No-op by default.
|
||||
* Called just before {@link #onEntry(VanillaContext, int)}. No-op by default.
|
||||
*/
|
||||
public void onBeforeEntry() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user