// û�������Ϣ����Ҫ�������
final List<Long> idList = entry.getValue();
final List<PutCommand> cmdList = putCmds.get(msgStore);
if (addedLocation == null) {
counter.incrementAndGet();
msgStore.append(idList, cmdList, new AppendCallback() {
@Override
public void appendComplete(final Location newLocation) {
replayed.set(true);
final int checksum =
CheckSum.crc32(MessageUtils.makeMessageBuffer(idList, cmdList).array());
locations.put(msgStore.getDescription(),
new AddMsgLocation(newLocation.getOffset(), newLocation.getLength(), checksum,
msgStore.getDescription()));
counter.decrementAndGet();
}
});
}
else {
// �����ط�
counter.incrementAndGet();
msgStore.replayAppend(addedLocation.getOffset(), addedLocation.getLength(),
addedLocation.checksum, idList, cmdList, new AppendCallback() {
@Override
public void appendComplete(final Location newLocation) {
// ����طŵ�ʱ�������λ�ã�����Ҫ����λ����Ϣ
if (newLocation != null) {
replayed.set(true);