-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
096ff2b
commit 3f3ba85
Showing
8 changed files
with
200 additions
and
757 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
83 changes: 83 additions & 0 deletions
83
chronicle-queue/src/main/java/net/openhft/chronicle/queue/impl/WireStore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,83 @@ | |||
/* | |||
* 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.queue.impl; | |||
|
|||
import net.openhft.chronicle.core.ReferenceCounted; | |||
import net.openhft.chronicle.wire.ReadMarshallable; | |||
import net.openhft.chronicle.wire.WriteMarshallable; | |||
import org.jetbrains.annotations.NotNull; | |||
|
|||
import java.io.IOException; | |||
|
|||
public interface WireStore extends ReferenceCounted { | |||
|
|||
/** | |||
* | |||
* @return | |||
*/ | |||
int cycle(); | |||
|
|||
/** | |||
* | |||
* @return | |||
*/ | |||
long dataPosition(); | |||
|
|||
/** | |||
* | |||
* @return | |||
*/ | |||
long writePosition(); | |||
|
|||
/** | |||
* | |||
* @return | |||
*/ | |||
long lastIndex(); | |||
|
|||
|
|||
/** | |||
* | |||
* @param cycle | |||
* @return | |||
* @throws IOException | |||
*/ | |||
boolean appendRollMeta(int cycle) throws IOException; | |||
|
|||
/** | |||
* | |||
* @param writer | |||
* @return | |||
* @throws IOException | |||
*/ | |||
long append(@NotNull WriteMarshallable writer) throws IOException; | |||
|
|||
/** | |||
* | |||
* @param position | |||
* @param reader | |||
* @return | |||
* @throws IOException | |||
*/ | |||
long read(long position, @NotNull ReadMarshallable reader) throws IOException; | |||
|
|||
/** | |||
* | |||
* @param index | |||
* @return | |||
*/ | |||
long positionForIndex(long index); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.