@Service(value="seckillService") public class SeckillServiceImpl extends Object implements ISeckillService
| Constructor and Description |
|---|
SeckillServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteSeckill(long seckillId)
删除秒杀售卖商品记录
|
Seckill |
getById(long seckillId)
查询单个秒杀记录
|
Long |
getSeckillCount(long seckillId)
查询秒杀售卖商品
|
List<Seckill> |
getSeckillList()
查询全部的秒杀记录
|
Result |
startSeckil(long seckillId,
long userId)
秒杀 一、会出现数量错误
|
Result |
startSeckilAopLock(long seckillId,
long userId)
秒杀 二、程序锁AOP
|
Result |
startSeckilDBOCC(long seckillId,
long userId,
long number)
秒杀 三、数据库悲观锁
|
Result |
startSeckilDBPCC_ONE(long seckillId,
long userId)
秒杀 二、数据库悲观锁
|
Result |
startSeckilDBPCC_TWO(long seckillId,
long userId)
秒杀 三、数据库悲观锁
|
Result |
startSeckilLock(long seckillId,
long userId)
秒杀 二、程序锁
|
public List<Seckill> getSeckillList()
ISeckillServicegetSeckillList in interface ISeckillServicepublic Seckill getById(long seckillId)
ISeckillServicegetById in interface ISeckillServicepublic Long getSeckillCount(long seckillId)
ISeckillServicegetSeckillCount in interface ISeckillService@Transactional public void deleteSeckill(long seckillId)
ISeckillServicedeleteSeckill in interface ISeckillService@Transactional public Result startSeckil(long seckillId, long userId)
ISeckillServicestartSeckil in interface ISeckillService@Transactional public Result startSeckilLock(long seckillId, long userId)
ISeckillServicestartSeckilLock in interface ISeckillService@Servicelock @Transactional public Result startSeckilAopLock(long seckillId, long userId)
ISeckillServicestartSeckilAopLock in interface ISeckillService@Transactional public Result startSeckilDBPCC_ONE(long seckillId, long userId)
ISeckillServicestartSeckilDBPCC_ONE in interface ISeckillService@Transactional public Result startSeckilDBPCC_TWO(long seckillId, long userId)
ISeckillServicestartSeckilDBPCC_TWO in interface ISeckillService@Transactional public Result startSeckilDBOCC(long seckillId, long userId, long number)
ISeckillServicestartSeckilDBOCC in interface ISeckillServiceCopyright © 2018 Pivotal Software, Inc.. All rights reserved.