}
public MapReply handleMapRequest(MapRequest request) {
- LOG.debug("DAO: Retrieving mapping for {}",
- LispAddressStringifier.getString(request.getEidItem().get(0).getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("DAO: Retrieving mapping for {}",
+ LispAddressStringifier.getString(request.getEidItem().get(0).getEid()));
+ }
tlsMapReply.set(null);
tlsMapRequest.set(null);
}
public Pair<MapNotify, List<TransportAddress>> handleMapRegister(MapRegister mapRegister) {
- LOG.debug("DAO: Adding mapping for {}",
- LispAddressStringifier.getString(mapRegister.getMappingRecordItem().get(0)
- .getMappingRecord().getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("DAO: Adding mapping for {}",
+ LispAddressStringifier.getString(mapRegister.getMappingRecordItem().get(0)
+ .getMappingRecord().getEid()));
+ }
tlsMapNotify.set(null);
mapServer.handleMapRegister(mapRegister);
@Override
public void handleSMR(MapRequest smr, Rloc subscriber) {
- LOG.debug("Sending SMR to {} with Source-EID {} and EID Record {}",
- LispAddressStringifier.getString(subscriber),
- LispAddressStringifier.getString(smr.getSourceEid().getEid()),
- LispAddressStringifier.getString(smr.getEidItem().get(0).getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Sending SMR to {} with Source-EID {} and EID Record {}",
+ LispAddressStringifier.getString(subscriber),
+ LispAddressStringifier.getString(smr.getSourceEid().getEid()),
+ LispAddressStringifier.getString(smr.getEidItem().get(0).getEid()));
+ }
SendMapRequestInputBuilder smrib = new SendMapRequestInputBuilder();
smrib.setMapRequest(new MapRequestBuilder(smr).build());
smrib.setTransportAddress(LispNotificationHelper.getTransportAddressFromRloc(subscriber));
@Override
public MappingAuthkey getAuthenticationKey(Eid key) {
- LOG.debug("Retrieving authentication key for {}", LispAddressStringifier.getString(key));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Retrieving authentication key for {}", LispAddressStringifier.getString(key));
+ }
return smc.getAuthenticationKey(key);
}
@Override
public void removeAuthenticationKey(Eid key) {
- LOG.debug("Removing authentication key for {}", LispAddressStringifier.getString(key));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Removing authentication key for {}", LispAddressStringifier.getString(key));
+ }
smc.removeAuthenticationKey(key);
}
@Override
public void addData(MappingOrigin origin, Eid key, String subKey, Object data) {
- LOG.debug("Add data of class {} for key {} and subkey {}", data.getClass(),
- LispAddressStringifier.getString(key), subKey);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Add data of class {} for key {} and subkey {}", data.getClass(),
+ LispAddressStringifier.getString(key), subKey);
+ }
tableMap.get(origin).addData(key, subKey, data);
}
@Override
public Object getData(MappingOrigin origin, Eid key, String subKey) {
- LOG.debug("Retrieving data for key {} and subkey {}", LispAddressStringifier.getString(key), subKey);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Retrieving data for key {} and subkey {}", LispAddressStringifier.getString(key), subKey);
+ }
return tableMap.get(origin).getData(key, subKey);
}
@Override
public void removeData(MappingOrigin origin, Eid key, String subKey) {
- LOG.debug("Removing data for key {} and subkey {}", LispAddressStringifier.getString(key), subKey);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Removing data for key {} and subkey {}", LispAddressStringifier.getString(key), subKey);
+ }
tableMap.get(origin).removeData(key, subKey);
}
}
public void addAuthenticationKey(AuthenticationKey authenticationKey) {
- LOG.debug("MD-SAL: Adding authentication key '{}' for {}", authenticationKey.getMappingAuthkey().getKeyString(),
- LispAddressStringifier.getString(authenticationKey.getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Adding authentication key '{}' for {}",
+ authenticationKey.getMappingAuthkey().getKeyString(),
+ LispAddressStringifier.getString(authenticationKey.getEid()));
+ }
InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
.createAuthenticationKeyIid(authenticationKey.getEid());
}
public void addMapping(Mapping mapping) {
- LOG.debug("MD-SAL: Adding mapping for {}",
- LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Adding mapping for {}",
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
+ }
InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
.createMappingIid(mapping.getMappingRecord().getEid(), mapping.getOrigin());
XtrId xtrId = mapping.getMappingRecord().getXtrId();
Preconditions.checkNotNull(xtrId, "Make sure you only call addXtrIdMapping when the MappingRecord "
+ "contains an xTR-ID");
- LOG.debug("MD-SAL: Adding mapping for {}, xTR-ID {}",
- LispAddressStringifier.getString(mapping.getMappingRecord().getEid()), xtrId);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Adding mapping for {}, xTR-ID {}",
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()), xtrId);
+ }
InstanceIdentifier<XtrIdMapping> path = InstanceIdentifierUtil
.createXtrIdMappingIid(mapping.getMappingRecord().getEid(), MappingOrigin.Southbound, xtrId);
}
public void removeAuthenticationKey(AuthenticationKey authenticationKey) {
- LOG.debug("MD-SAL: Removing authentication key for {}",
- LispAddressStringifier.getString(authenticationKey.getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Removing authentication key for {}",
+ LispAddressStringifier.getString(authenticationKey.getEid()));
+ }
InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
.createAuthenticationKeyIid(authenticationKey.getEid());
}
public void removeMapping(Mapping mapping) {
- LOG.debug("MD-SAL: Removing mapping for {}",
- LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Removing mapping for {}",
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
+ }
InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
.createMappingIid(mapping.getMappingRecord().getEid(), mapping.getOrigin());
XtrId xtrId = mapping.getMappingRecord().getXtrId();
Preconditions.checkNotNull(xtrId, "Make sure you only call addXtrIdMapping when the MappingRecord "
+ "contains an xTR-ID");
- LOG.debug("MD-SAL: Removing mapping for {}, xTR-ID {}",
- LispAddressStringifier.getString(mapping.getMappingRecord().getEid()), xtrId);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Removing mapping for {}, xTR-ID {}",
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()), xtrId);
+ }
InstanceIdentifier<XtrIdMapping> path = InstanceIdentifierUtil
.createXtrIdMappingIid(mapping.getMappingRecord().getEid(), MappingOrigin.Southbound, xtrId);
}
public void updateAuthenticationKey(AuthenticationKey authenticationKey) {
- LOG.debug("MD-SAL: Updating authentication key for {} with '{}'",
- LispAddressStringifier.getString(authenticationKey.getEid()),
- authenticationKey.getMappingAuthkey().getKeyString());
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Updating authentication key for {} with '{}'",
+ LispAddressStringifier.getString(authenticationKey.getEid()),
+ authenticationKey.getMappingAuthkey().getKeyString());
+ }
InstanceIdentifier<AuthenticationKey> path = InstanceIdentifierUtil
.createAuthenticationKeyIid(authenticationKey.getEid());
}
public void updateMapping(Mapping mapping) {
- LOG.debug("MD-SAL: Updating mapping for {}",
- LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("MD-SAL: Updating mapping for {}",
+ LispAddressStringifier.getString(mapping.getMappingRecord().getEid()));
+ }
InstanceIdentifier<Mapping> path = InstanceIdentifierUtil
.createMappingIid(mapping.getMappingRecord().getEid(), mapping.getOrigin());