![JAR search and dependency download from the Maven repository](/logo.png)
com.elephantdrummer.tool.HistoryBuffer Maven / Gradle / Ivy
package com.elephantdrummer.tool;
import java.util.concurrent.ConcurrentLinkedQueue;
import com.elephantdrummer.container.Container;
import com.elephantdrummer.container.ContainerElement;
import com.elephantdrummer.model.PtHistory;
/**
* Copyright 2018 Elephant Software Klaudiusz Wojtkowiak e-mail: [email protected]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//@Singleton
public class HistoryBuffer extends ConcurrentLinkedQueue implements ContainerElement{
private static final long serialVersionUID = -3741683679786417675L;
//private ProducerCDIObjectFromClass cdiproducer=Container.getElement(ProducerCDIObjectFromClass.class);
private PlatformInformation platformInformation=Container.getElement(PlatformInformation.class);
// public void addJob(JobData data){
// PtHistory his=new PtHistory();
// his.setStartDate(data.getStartDate());
// his.setStopDate(data.getFinishDate());
// his.setJobUUIDId(data.getId());
// his.setJobId(data.getPtJob().getPtJobId());
// //his.setPtApplicationId(getPlatformInformation().getPtPlatform().getPtApplicationId());
// //his.setExecutionTime(new BigDecimal(his.getStopDate().getTime()-his.getStartDate().getTime()));
// his.setExecutionComment(data.getExecutionComment());
// his.setStatus(new BigDecimal(data.getStatus()));
// his.setPoolSize(data.getPoolSize()==null?null:new BigDecimal(data.getPoolSize().intValue()));
// his.setPtExecutorId(data.getPtExecutorId());
// add(his);
// //usuwa powyzej 100 elementu
// while(size()>4) remove();
// }
private PlatformInformation getPlatformInformation() {
return platformInformation;
}
private void setPlatformInformation(PlatformInformation platformInformation) {
this.platformInformation = platformInformation;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy