Skip to content

Commit

Permalink
Test a compile error on the build server. Do I get email?
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Apr 11, 2008
1 parent 57cd16a commit ff40446
Show file tree
Hide file tree
Showing 13 changed files with 226 additions and 12 deletions.
@@ -1,3 +1,22 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.service;

import java.util.Collection;
Expand Down
Expand Up @@ -18,7 +18,6 @@
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/

package org.jumpmind.symmetric.service.impl;

import java.net.ConnectException;
Expand Down
@@ -1,3 +1,22 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.service.impl;

import java.util.Collection;
Expand Down
@@ -0,0 +1,39 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.service.jmx;

import java.math.BigDecimal;

import org.jumpmind.symmetric.statistic.IStatisticManager;
import org.springframework.jmx.export.annotation.ManagedResource;

@ManagedResource(description = "The management interface for incoming synchronization")
public class IncomingManagementService {

IStatisticManager statisticManager;

public void setStatisticManager(IStatisticManager statisticManager) {
this.statisticManager = statisticManager;
}

public BigDecimal getDatabaseMsPerRow() {

}
}
@@ -0,0 +1,27 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.service.jmx;

import org.springframework.jmx.export.annotation.ManagedResource;

@ManagedResource(description = "The management interface for nodes")
public class NodeManagementService {

}
@@ -0,0 +1,27 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.service.jmx;

import org.springframework.jmx.export.annotation.ManagedResource;

@ManagedResource(description = "The management interface for outgoing synchronization")
public class OutgoingManagementService {

}
Expand Up @@ -18,7 +18,6 @@
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/

package org.jumpmind.symmetric.service.jmx;

import java.io.ByteArrayOutputStream;
Expand Down Expand Up @@ -46,7 +45,7 @@
import org.springframework.jmx.export.annotation.ManagedOperationParameters;
import org.springframework.jmx.export.annotation.ManagedResource;

@ManagedResource(description = "The management interface for symmetric")
@ManagedResource(description = "The management interface for SymmetricDS")
public class SymmetricManagementService {

private IRuntimeConfig runtimeConfiguration;
Expand Down
@@ -1,3 +1,22 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.statistic;

public interface IStatisticManager {
Expand Down
@@ -1,3 +1,22 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.statistic;

import java.math.BigDecimal;
Expand Down
@@ -1,3 +1,22 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.statistic;

import java.util.Date;
Expand All @@ -15,24 +34,26 @@ public class StatisticManager implements IStatisticManager {
INodeService nodeService;

IStatisticService statisticService;

synchronized public void init() {
refresh(new Date());
}

if (statistics == null) {
refresh(new Date());
}
}

synchronized public void flush() {
Date captureEndTime = new Date();
if (statistics != null) {
statisticService.save(statistics.values(), captureEndTime);
}
refresh(captureEndTime);
}

synchronized protected void refresh(Date lastCaptureEndTime) {
if (statistics == null) {
statistics = new HashMap<StatisticName, Statistic>();
}

statistics.clear();

Node node = nodeService.findIdentity();
Expand All @@ -48,6 +69,7 @@ synchronized protected void refresh(Date lastCaptureEndTime) {
}

public Statistic getStatistic(StatisticName name) {
this.init();
return statistics.get(name);
}

Expand Down
@@ -1,3 +1,22 @@
/*
* SymmetricDS is an open source database synchronization solution.
*
* Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
package org.jumpmind.symmetric.statistic;

public enum StatisticName {
Expand Down
7 changes: 7 additions & 0 deletions symmetric/src/main/resources/symmetric-jmx.xml
Expand Up @@ -23,6 +23,9 @@
<property name="mappings">
<props>
<prop key="managementService">Symmetric:name=${symmetric.runtime.engine.name}</prop>
<prop key="incomingManagementService">org.jumpmind.symmetric.${symmetric.runtime.engine.name}:name=Incoming</prop>
<prop key="outgoingManagementService">org.jumpmind.symmetric.${symmetric.runtime.engine.name}:name=Outgoing</prop>
<prop key="nodeManagementService">org.jumpmind.symmetric.${symmetric.runtime.engine.name}:name=Node</prop>
</props>
</property>
<property name="mappingLocations">
Expand All @@ -44,5 +47,9 @@
<property name="nodeService" ref="nodeService" />
<property name="dataExtractorService" ref="dataExtractorService" />
</bean>

<bean id="incomingManagementService" class="org.jumpmind.symmetric.service.jmx.IncomingManagementService"/>
<bean id="outgoingManagementService" class="org.jumpmind.symmetric.service.jmx.OutgoingManagementService"/>
<bean id="nodeManagementService" class="org.jumpmind.symmetric.service.jmx.NodeManagementService"/>

</beans>
5 changes: 2 additions & 3 deletions symmetric/src/main/resources/symmetric-services.xml
Expand Up @@ -13,11 +13,10 @@
<property name="runtimeConfiguration" ref="runtimeConfiguration" />
</bean>

<bean id="statisticManager" class="org.jumpmind.symmetric.statistic.StatisticManager" init-method="init">
<bean id="statisticManager" class="org.jumpmind.symmetric.statistic.StatisticManager">
<property name="statisticService" ref="statisticService"/>
<property name="nodeService" ref="nodeService"/>
</bean>

</bean>

<bean id="transportManager" class="org.jumpmind.symmetric.transport.TransportManagerFactoryBean"
scope="singleton">
Expand Down

0 comments on commit ff40446

Please sign in to comment.