Skip to content

Commit

Permalink
Add MarshallableIn to WireIn and MarshallableOut to WireOut
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-lawrey committed May 17, 2017
1 parent 5fad0a4 commit deac380
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -89,7 +89,7 @@ default void pretouch() {
*/
void padToCacheAlign(Padding padToCacheAlign);

Padding padToCacheAlign();
Padding padToCacheAlignMode();

/**
* Set whether to trigger indexing.
Expand Down
Expand Up @@ -93,7 +93,7 @@ static class StoreAppender implements ExcerptAppender, ExcerptContext, InternalA
context = new StoreAppenderContext();
}

public Padding padToCacheAlign() {
public Padding padToCacheAlignMode() {
return padToCacheLines;
}

Expand All @@ -116,7 +116,7 @@ public void padToCacheAlign(Padding padToCacheLines) {
public void writeBytes(@NotNull WriteBytesMarshallable marshallable) throws UnrecoverableTimeoutException {
try (DocumentContext dc = writingDocument()) {
marshallable.writeMarshallable(dc.wire().bytes());
if (padToCacheAlign() != Padding.ALWAYS)
if (padToCacheAlignMode() != Padding.ALWAYS)
((StoreAppenderContext) dc).padToCacheAlign = false;
}
}
Expand All @@ -126,7 +126,7 @@ public void writeText(CharSequence text) throws UnrecoverableTimeoutException {
try (DocumentContext dc = writingDocument()) {
dc.wire().bytes()
.append8bit(text);
if (padToCacheAlign() != Padding.ALWAYS)
if (padToCacheAlignMode() != Padding.ALWAYS)
((StoreAppenderContext) dc).padToCacheAlign = false;
}
}
Expand Down Expand Up @@ -284,7 +284,7 @@ public DocumentContext writingDocument(boolean metaData) throws UnrecoverableTim
position(pos);
context.isClosed = false;
context.wire = wire;
context.padToCacheAlign = padToCacheAlign() != Padding.NEVER;
context.padToCacheAlign = padToCacheAlignMode() != Padding.NEVER;
context.metaData(metaData);
ok = true;
return context;
Expand Down

0 comments on commit deac380

Please sign in to comment.