comparison paper/chapter2.tex @ 47:b303f22d8b0d

Modified
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Fri, 31 Jan 2014 05:46:50 +0900
parents 618adf0a9b2b
children 6553b7a3717c
comparison
equal deleted inserted replaced
46:c63aaa629330 47:b303f22d8b0d
129 \item \verb|deleteAttribute(NodePath _path, String _key)| 129 \item \verb|deleteAttribute(NodePath _path, String _key)|
130 \verb|_key| が示す attribute の削除を行う API である. 130 \verb|_key| が示す attribute の削除を行う API である.
131 NodePath は Node を示す. 131 NodePath は Node を示す.
132 \end{itemize} 132 \end{itemize}
133 133
134 NodeOperation はあくまで最小のデータ編集の単位である. 134 NodeOperationはNodePathとセットで扱わなければならず, このセットを
135 アプリケーションレベルの実装にもよるが, Jungle によるデータの編集は NodeOperation が複数集まった単位によって行われる. 135 TreeOperationという.
136 この複数の NodeOperation の集まりを TreeOperationLog という. 136 TreeOperationが1つのデータ編集の単位になるが, これはあくまで最小のデータ編集の単位である.
137 Jungle によるデータの編集はTreeOperationが複数集まった単位でcommitされていく.
138 このTreeOperationの集まりをTreeOperationLogという.
137 139
138 \subsection{TreeOperationLog} 140 \subsection{TreeOperationLog}
139 Jungle 内部では NodeOperation は順次ログに積まれていき, 最終的に 141 Jungle 内部ではTreeOperationは順次ログに積まれていき, 最終的に
140 commit されることで編集が完了する. 142 commitされることで編集が完了する.
141 この時, ログに積まれた複数の NodeOperation は TreeOperationLog として扱われる. 143 この時, ログに積まれた複数のTreeOperationはTreeOperationLogとして扱われる.
142 以下に TreeOperationLog の具体的な例を示す(\ref{src:treelog}). 144 以下にTreeOperationLogの具体的な例を示す(\ref{src:treelog}).
143 \begin{lstlisting}[frame=lrbt,label=src:treelog,caption=トポロジーマネージャーの利用,numbers=left] 145 \begin{lstlisting}[frame=lrbt,label=src:treelog,caption=トポロジーマネージャーの利用,numbers=left]
144 [APPEND_CHILD:<-1>:pos:0] 146 [APPEND_CHILD:<-1>:pos:0]
145 [PUT_ATTRIBUTE:<-1,0>:key:author,value:oshiro] 147 [PUT_ATTRIBUTE:<-1,0>:key:author,value:oshiro]
146 [PUT_ATTRIBUTE:<-1,0>:key:mes,value:hello] 148 [PUT_ATTRIBUTE:<-1,0>:key:mes,value:hello]
147 [PUT_ATTRIBUTE:<-1,0>:key:timestamp,value:0] 149 [PUT_ATTRIBUTE:<-1,0>:key:timestamp,value:0]