public class ExclusiveWriteLogNode extends Object implements WriteLogNode, Comparable<ExclusiveWriteLogNode>
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
WAL_FILE_NAME |
| 构造器和说明 |
|---|
ExclusiveWriteLogNode(String identifier)
constructor of ExclusiveWriteLogNode.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Sync and close streams.
|
int |
compareTo(ExclusiveWriteLogNode o) |
ByteBuffer[] |
delete()
Abandon all logs in this node and delete the log directory.
|
boolean |
equals(Object obj) |
void |
forceSync()
Write what in cache to disk.
|
String |
getIdentifier()
return identifier of the log node.
|
String |
getLogDirectory()
return the directory where wal files of this node are placed.
|
ILogReader |
getLogReader()
return an ILogReader which can iterate each log in this log node.
|
int |
hashCode() |
void |
initBuffer(ByteBuffer[] byteBuffers)
init the buffers, this should be called after this node being created.
|
void |
notifyEndFlush()
When data that have WALs in this node end flushing, this method must be called to check and
remove the out-dated logs file.
|
void |
notifyStartFlush()
When data that have WALs in this node start to be flushed, this method must be called to change
the working WAL file.
|
void |
release()
Release the resource it occupies.
|
String |
toString() |
void |
write(PhysicalPlan plan)
Write a wal for a PhysicalPlan.
|
public ExclusiveWriteLogNode(String identifier)
identifier - ExclusiveWriteLogNode identifierpublic void initBuffer(ByteBuffer[] byteBuffers)
WriteLogNodeinitBuffer 在接口中 WriteLogNodepublic void write(PhysicalPlan plan) throws IOException
WriteLogNodewrite 在接口中 WriteLogNodeplan - - a PhysicalPlanIOExceptionpublic void close()
WriteLogNodeclose 在接口中 WriteLogNodepublic void release()
WriteLogNoderelease 在接口中 WriteLogNodepublic void forceSync()
WriteLogNodeforceSync 在接口中 WriteLogNodepublic void notifyStartFlush()
throws FileNotFoundException
WriteLogNodenotifyStartFlush 在接口中 WriteLogNodeFileNotFoundExceptionpublic void notifyEndFlush()
WriteLogNodenotifyEndFlush 在接口中 WriteLogNodepublic String getIdentifier()
WriteLogNodegetIdentifier 在接口中 WriteLogNodepublic String getLogDirectory()
WriteLogNodegetLogDirectory 在接口中 WriteLogNodepublic ByteBuffer[] delete() throws IOException
WriteLogNodedelete 在接口中 WriteLogNodeIOExceptionpublic ILogReader getLogReader()
WriteLogNodegetLogReader 在接口中 WriteLogNodepublic int compareTo(ExclusiveWriteLogNode o)
compareTo 在接口中 Comparable<ExclusiveWriteLogNode>Copyright © 2022 The Apache Software Foundation. All rights reserved.