mirror of https://github.com/apache/cloudstack.git
bug 11561: Added new Dao RandomlyIncreasing, which will increase the Vm Id by 1-10 randomly
status 11561: resolved fixed
This commit is contained in:
parent
86ea3a1c12
commit
06d3d8db85
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* Copyright (C) 2011 Cloud.com, Inc. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the GNU General Public License v3 or later.
|
||||
*
|
||||
* It is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or any later version.
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.cloud.vm.dao;
|
||||
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
@Local(value = { UserVmDao.class })
|
||||
public class RandomlyIncreasingVMInstanceDaoImpl extends UserVmDaoImpl {
|
||||
|
||||
public static final Logger s_logger = Logger.getLogger(RandomlyIncreasingVMInstanceDaoImpl.class);
|
||||
|
||||
@Override
|
||||
public <K> K getNextInSequence(final Class<K> clazz, final String name) {
|
||||
return getRandomlyIncreasingNextInSequence(clazz, name);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue