1 /*
2 * Copyright 2008 fastConnect.
3 *
4 * This file is part of Composite BulkDataPersister.
5 *
6 * This is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 3 of
9 * the License, or (at your option) any later version.
10 *
11 * This software is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this software. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package fr.fastconnect.gigaspaces.datasource;
20
21 import java.util.List;
22
23 import com.gigaspaces.datasource.BulkItem;
24 import com.gigaspaces.datasource.DataSourceException;
25
26 import fr.fastconnect.wanblueprint.mirror.ExternalDataSourceAdapter;
27
28 /**
29 * Implementation of a {@link com.gigaspaces.datasource.BulkDataPersister} whose {@link com.gigaspaces.datasource.BulkDataPersister#executeBulk(List)} simply print the argument size.
30 *
31 * @param <T>
32 */
33 public class ExternalDataSourceLogger<T> extends ExternalDataSourceAdapter<T> {
34
35 @Override
36 public void executeBulk(final List<BulkItem> bulk) throws DataSourceException {
37 System.out.println("ExternalDataSourceLogger#executeBulk: "+bulk.size());
38 }
39
40 }