@Override public RedisZSet<E> remove(long start, long end) { boundZSetOps.removeRange(start, end); return this; }
@Override public void clear() { boundZSetOps.removeRange(0, -1); }
@Override public void clear() { boundZSetOps.removeRange(0, -1); }
@Override public RedisZSet<E> remove(long start, long end) { boundZSetOps.removeRange(start, end); return this; }
@Override public RedisZSet<E> remove(long start, long end) { boundZSetOps.removeRange(start, end); return this; }
@Override public void clear() { boundZSetOps.removeRange(0, -1); }
@Override public Notifier notify( JobConfiguration id, NotificationLevel level, String message, boolean completed ) { if ( id != null && !(level != null && level.isOff()) ) { Notification notification = new Notification( level, id.getJobType(), new Date(), message, completed ); String notificationKey = generateNotificationKey( id.getJobType(), id.getUid() ); String notificationOrderKey = generateNotificationOrderKey( id.getJobType() ); Date now = new Date(); try { if ( redisTemplate.boundZSetOps( notificationOrderKey ).zCard() >= MAX_POOL_TYPE_SIZE ) { Set<String> deleteKeys = redisTemplate.boundZSetOps( notificationOrderKey ).range( 0, 0 ); redisTemplate.delete( deleteKeys ); redisTemplate.boundZSetOps( notificationOrderKey ).removeRange( 0, 0 ); } redisTemplate.boundZSetOps( notificationKey ).add( objectMapper.writeValueAsString( notification ), now.getTime() ); redisTemplate.boundZSetOps( notificationOrderKey ).add( id.getUid(), now.getTime() ); } catch ( JsonProcessingException ex ) { log.warn( String.format( NOTIFIER_ERROR, ex.getMessage() ) ); } log.info( notification ); } return this; }
redisTemplate.boundZSetOps( summaryOrderKey ).removeRange( 0, 0 ); summaryKeyToBeDeleted.forEach( d -> redisTemplate.boundHashOps( summaryKey ).delete( d ) );