public interface IStoreWriter
This interface defines a store writer. Store writers durably write store objects and/or transactions to an abstract destination.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IStoreWriter.LogCounters
Holds transaction log related counters.
|
static class |
IStoreWriter.Parameters
Contains writer parameters
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush(boolean sync)
Sync any locally buffered data.
|
IStoreWriter.Parameters |
getParameters()
Get a writer's operating parameters
|
boolean |
isShared()
Indicates whether the writer is writing to a shared resource.
|
void |
onRoleChange(IStoreBinding.Role role)
Invoked to notify of a change to the role of the using store binding.
|
void |
writeCommitEntry(PktPacket packet,
boolean sync)
Write a commit entry
|
IStoreWriter.Parameters getParameters()
boolean isShared()
This method returns whether the writer is accessing a shared resource between primary and backup cluster members. Shared writers are only opened on the primary cluster members while non-shared writers are opened concurrently on both. However, transactions are recorded and committed concurrently on both shared and non-shared writers.
void onRoleChange(IStoreBinding.Role role)
This method is invoked by a store binding to notify a writer of a a change in the binding's role.
void writeCommitEntry(PktPacket packet, boolean sync)
packet - The commit entry packet to writesync - Indicates whether to perform a flush(boolean) with sync
after writing this commit entry.Note: This method assumes that the supplied packet has already been sync'd
void flush(boolean sync)
Write operations performed using the writer can cache the written data in local memory. This operation flushes any buffered data out of the local memory. If the sync parameter is set to true, then the flush must synchornously push all the data to the destination e.g. cut through all intermediate buffers such as OS caches, CPU caches and network buffers.
No record operations will be invoked concurrently with this method.
Copyright © 2019 N5 Technologies, Inc. All Rights Reserved.