T
- The type of the SMR object.
Created by mwei on 11/10/16.public interface ICorfuSMRProxy<T>
Modifier and Type | Method and Description |
---|---|
<R> R |
access(ICorfuSMRAccess<R,T> accessMethod,
Object[] conflictObject)
Access the state of the object.
|
IObjectBuilder<?> |
getObjectBuilder()
Get an object builder to build new objects.
|
Class<T> |
getObjectType()
Return the type of the object being replicated.
|
UUID |
getStreamID()
Get the ID of the stream this proxy is subscribed to.
|
<R> R |
getUpcallResult(long timestamp,
Object[] conflictObject)
Return the result of an upcall at the given timestamp.
|
long |
getVersion()
Get the latest version read by the proxy.
|
long |
logUpdate(String smrUpdateFunction,
boolean keepUpcallResult,
Object[] conflictObject,
Object... args)
Record an SMR function to the log before returning.
|
void |
sync()
Update the proxy to the latest committed version.
|
<R> R |
TXExecute(Supplier<R> txFunction)
Run in a transactional context.
|
<R> R access(ICorfuSMRAccess<R,T> accessMethod, Object[] conflictObject)
R
- The type to return.accessMethod
- The method to execute when accessing an object.conflictObject
- Fine-grained conflict information, if available.long logUpdate(String smrUpdateFunction, boolean keepUpcallResult, Object[] conflictObject, Object... args)
smrUpdateFunction
- The name of the function to record.keepUpcallResult
- Whether or not we need to keep the
result to the upcall, for a subsequent
call to getUpcallResult.conflictObject
- Fine-grained conflict information, if
available.args
- The arguments to the function.<R> R getUpcallResult(long timestamp, Object[] conflictObject)
R
- The type of the upcall to return.timestamp
- The timestamp to request the upcall for.conflictObject
- Fine-grained conflict information, if
available.void sync()
UUID getStreamID()
<R> R TXExecute(Supplier<R> txFunction)
R
- The return type.txFunction
- The function to run in a transactional context.IObjectBuilder<?> getObjectBuilder()
Class<T> getObjectType()
long getVersion()
Copyright © 2019 CorfuDB. All rights reserved.