Skip to content

Commit 38f9266

Browse files
committed
Fixed missing license headers
1 parent 63d1be2 commit 38f9266

13 files changed

Lines changed: 286 additions & 22 deletions

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/AddCompletion.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import io.netty.util.Recycler;
@@ -12,7 +33,7 @@ static AddCompletion acquireAddCompletion(final CompletionKey key,
1233
final Object originalCtx,
1334
final long ledgerId, final long entryId,
1435
PerChannelBookieClient perChannelBookieClient) {
15-
AddCompletion completion = addCompletionRecycler.get();
36+
AddCompletion completion = ADD_COMPLETION_RECYCLER.get();
1637
completion.reset(key, originalCallback, originalCtx, ledgerId, entryId, perChannelBookieClient);
1738
return completion;
1839
}
@@ -121,7 +142,7 @@ private void handleResponse(long ledgerId, long entryId,
121142
writeComplete(rc, ledgerId, entryId, perChannelBookieClient.bookieId, ctx);
122143
}
123144

124-
private static final Recycler<AddCompletion> addCompletionRecycler = new Recycler<AddCompletion>() {
145+
private static final Recycler<AddCompletion> ADD_COMPLETION_RECYCLER = new Recycler<AddCompletion>() {
125146
@Override
126147
protected AddCompletion newObject(Recycler.Handle<AddCompletion> handle) {
127148
return new AddCompletion(handle);

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BatchedReadCompletion.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import org.apache.bookkeeper.client.BKException;

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/CompletionKey.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType;

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/CompletionValue.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import com.google.common.base.Joiner;

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/EntryCompletionKey.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import io.netty.util.Recycler;
@@ -9,7 +30,7 @@ class EntryCompletionKey extends CompletionKey {
930

1031
static EntryCompletionKey acquireV2Key(long ledgerId, long entryId,
1132
BookkeeperProtocol.OperationType operationType) {
12-
EntryCompletionKey key = v2KeyRecycler.get();
33+
EntryCompletionKey key = V2_KEY_RECYCLER.get();
1334
key.reset(ledgerId, entryId, operationType);
1435
return key;
1536
}
@@ -50,7 +71,7 @@ public void release() {
5071
recyclerHandle.recycle(this);
5172
}
5273

53-
private static final Recycler<EntryCompletionKey> v2KeyRecycler =
74+
private static final Recycler<EntryCompletionKey> V2_KEY_RECYCLER =
5475
new Recycler<EntryCompletionKey>() {
5576
@Override
5677
protected EntryCompletionKey newObject(

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ForceLedgerCompletion.java

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import org.apache.bookkeeper.client.BKException;
@@ -15,16 +36,11 @@ public ForceLedgerCompletion(final CompletionKey key,
1536
originalCtx, ledgerId, BookieProtocol.LAST_ADD_CONFIRMED, perChannelBookieClient);
1637
this.opLogger = perChannelBookieClient.forceLedgerOpLogger;
1738
this.timeoutOpLogger = perChannelBookieClient.forceLedgerTimeoutOpLogger;
18-
this.cb = new BookkeeperInternalCallbacks.ForceLedgerCallback() {
19-
@Override
20-
public void forceLedgerComplete(int rc, long ledgerId,
21-
BookieId addr,
22-
Object ctx) {
23-
logOpResult(rc);
24-
originalCallback.forceLedgerComplete(rc, ledgerId,
25-
addr, originalCtx);
26-
key.release();
27-
}
39+
this.cb = (rc, ledgerId1, addr, ctx) -> {
40+
logOpResult(rc);
41+
originalCallback.forceLedgerComplete(rc, ledgerId1,
42+
addr, originalCtx);
43+
key.release();
2844
};
2945
}
3046

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/GetBookieInfoCompletion.java

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import org.apache.bookkeeper.client.BKException;
@@ -14,14 +35,10 @@ public GetBookieInfoCompletion(final CompletionKey key,
1435
super("GetBookieInfo", origCtx, 0L, 0L, perChannelBookieClient);
1536
this.opLogger = perChannelBookieClient.getBookieInfoOpLogger;
1637
this.timeoutOpLogger = perChannelBookieClient.getBookieInfoTimeoutOpLogger;
17-
this.cb = new BookkeeperInternalCallbacks.GetBookieInfoCallback() {
18-
@Override
19-
public void getBookieInfoComplete(int rc, BookieInfoReader.BookieInfo bInfo,
20-
Object ctx) {
21-
logOpResult(rc);
22-
origCallback.getBookieInfoComplete(rc, bInfo, origCtx);
23-
key.release();
24-
}
38+
this.cb = (rc, bInfo, ctx) -> {
39+
logOpResult(rc);
40+
origCallback.getBookieInfoComplete(rc, bInfo, origCtx);
41+
key.release();
2542
};
2643
}
2744

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/GetListOfEntriesOfLedgerCompletion.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import io.netty.buffer.ByteBuf;

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadCompletion.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import io.netty.buffer.ByteBuf;

bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadLacCompletion.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
/*
2+
*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*
20+
*/
21+
122
package org.apache.bookkeeper.proto;
223

324
import io.netty.buffer.ByteBuf;

0 commit comments

Comments
 (0)