Skip to content

Commit

Permalink
add wireType() to wireStore, improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Austin committed Aug 19, 2016
1 parent f7933f5 commit 90764fd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/main/java/net/openhft/chronicle/queue/impl/WireStore.java
Expand Up @@ -19,17 +19,16 @@
import net.openhft.chronicle.core.ReferenceCounted;
import net.openhft.chronicle.core.io.Closeable;
import net.openhft.chronicle.queue.impl.single.ScanResult;
import net.openhft.chronicle.wire.Demarshallable;
import net.openhft.chronicle.wire.UnrecoverableTimeoutException;
import net.openhft.chronicle.wire.Wire;
import net.openhft.chronicle.wire.WriteMarshallable;
import net.openhft.chronicle.wire.*;
import org.jetbrains.annotations.NotNull;

import java.io.EOFException;
import java.io.File;
import java.io.StreamCorruptedException;

public interface WireStore extends ReferenceCounted, Demarshallable, WriteMarshallable, Closeable {


/**
* @return the file associated with this store.
*/
Expand Down Expand Up @@ -79,4 +78,9 @@ public interface WireStore extends ReferenceCounted, Demarshallable, WriteMarsha
void writeEOF(Wire wire, long timeoutMS) throws UnrecoverableTimeoutException;

int deltaCheckpointInterval();

/**
* @return the type of wire used
*/
WireType wireType();
}
Expand Up @@ -109,7 +109,6 @@ private SingleChronicleQueueStore(WireIn wire) {
}
}


/**
* @param rollCycle the current rollCycle
* @param wireType the wire type that is being used
Expand Down Expand Up @@ -156,6 +155,14 @@ public static String dump(String directoryFilePath) {
return q.dump();
}

/**
* @return the type of wire used
*/
@Override
public WireType wireType() {
return wireType;
}

@Override
public File file() {
return mappedFile == null ? null : mappedFile.file();
Expand Down Expand Up @@ -354,5 +361,7 @@ public Object defaultValue() {
throw new IORuntimeException("field " + name() + " required");
}
}


}

0 comments on commit 90764fd

Please sign in to comment.