/** * {@inheritDoc} */ @Override public void enableNotification( ChangeType changeType ) { changeTypes |= changeType.getValue(); }
switch ( ChangeType.getChangeType( change ) ) case MODDN: case MODIFY: ChangeType changeType = ChangeType.getChangeType( change );
/** * @see Object#hashCode() */ @Override public int hashCode() { int h = super.hashCode(); h = h * 37 + ( int ) changeNumber; h = h * 37 + ( changeType == null ? 0 : changeType.hashCode() ); h = h * 37 + ( previousDn == null ? 0 : previousDn.hashCode() ); return h; }
/** * selects the current queue entry if qualified for sending to the consumer * * @throws Exception */ private boolean isQualified( String csn, ReplicaEventMessage evtMsg ) throws LdapException { LOG.debug( "ReplicaEventMessage: {}", evtMsg ); if ( evtMsg.isEventOlderThan( consumerCsn ) ) { if ( LOG.isDebugEnabled() ) { String evt = "MODDN"; // take this as default cause the event type for MODDN is null ChangeType changeType = evtMsg.getChangeType(); if ( changeType != null ) { evt = changeType.name(); } LOG.debug( "event {} for dn {} is not qualified for sending", evt, evtMsg.getEntry().getDn() ); } return false; } return true; }
switch ( ChangeType.getChangeType( change ) ) case MODDN: case MODIFY: ChangeType changeType = ChangeType.getChangeType( change );
/** * @see Object#hashCode() */ @Override public int hashCode() { int h = super.hashCode(); h = h * 37 + ( int ) changeNumber; h = h * 37 + ( changeType == null ? 0 : changeType.hashCode() ); h = h * 37 + ( previousDn == null ? 0 : previousDn.hashCode() ); return h; }
/** * {@inheritDoc} */ @Override public void enableNotification( ChangeType changeType ) { changeTypes |= changeType.getValue(); }
ChangeType changeType = ChangeType.getChangeType( type );
/** * @see Object#hashCode() */ @Override public int hashCode() { int h = super.hashCode(); h = h * 37 + ( int ) changeNumber; h = h * 37 + ( changeType == null ? 0 : changeType.hashCode() ); h = h * 37 + ( previousDn == null ? 0 : previousDn.hashCode() ); return h; }
/** * {@inheritDoc} */ @Override public void disableNotification( ChangeType changeType ) { changeTypes &= ~changeType.getValue(); }
switch ( ChangeType.getChangeType( change ) ) case MODDN: case MODIFY: ChangeType changeType = ChangeType.getChangeType( change );
/** * {@inheritDoc} */ @Override public void disableNotification( ChangeType changeType ) { changeTypes &= ~changeType.getValue(); }
ctl = new PersistentSearchImpl(); for (PersistentSearchChangeType type : c.getChangeTypes()) { ((PersistentSearchImpl) ctl).enableNotification(ChangeType.getChangeType(type.value()));
/** * {@inheritDoc} */ @Override public boolean isNotificationEnabled( ChangeType changeType ) { return ( changeType.getValue() & changeTypes ) > 0; }
/** * {@inheritDoc} */ @Override public void disableNotification( ChangeType changeType ) { changeTypes &= ~changeType.getValue(); }
/** * {@inheritDoc} */ @Override public boolean isNotificationEnabled( ChangeType changeType ) { return ( changeType.getValue() & changeTypes ) > 0; }
/** * {@inheritDoc} */ @Override public boolean isNotificationEnabled( ChangeType changeType ) { return ( changeType.getValue() & changeTypes ) > 0; }
/** * {@inheritDoc} */ @Override public void enableNotification( ChangeType changeType ) { changeTypes |= changeType.getValue(); }
/** * {@inheritDoc} */ public byte[] serialize( Object object ) throws IOException { ReplicaEventMessage replicaEventMessage = ( ReplicaEventMessage ) object; Entry entry = replicaEventMessage.getEntry(); ChangeType changeType = replicaEventMessage.getChangeType(); try ( ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream( baos ) ) { // The change type first out.writeByte( changeType.getValue() ); // The entry DN entry.getDn().writeExternal( out ); // The entry entry.writeExternal( out ); out.flush(); return baos.toByteArray(); } }
buffer.put( BerValue.getBytes( getChangeType().getValue() ) );