/** * Create the Diameter Activity Handle for an given session id * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }
public void marshalHandle(ActivityHandle handle, DataOutput out) throws IOException { DiameterActivityHandle dah = (DiameterActivityHandle)handle; out.writeUTF(dah.getId()); }
/** * Create the Diameter Activity Handle for an given session id * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }
public int getEstimatedHandleSize(ActivityHandle handle) { return ((DiameterActivityHandle) handle).getId().length(); }
/** * Create the Diameter Activity Handle for an given session id * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }
public void update(DiameterActivityHandle handle, DiameterActivity activity) { this.replicatedData.put(handle.getId(), activity); } /*
public DiameterActivityHandle getActivityHandle() { if (this.handle == null) { this.handle = new DiameterActivityHandle(this.sessionId); } return this.handle; }
public void put(DiameterActivityHandle handle, DiameterActivity activity) { // replicate even base? this.replicatedData.put(handle.getId(), activity); }
/** * Create the Diameter Activity Handle for an given session id * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }
public boolean containsKey(DiameterActivityHandle activityHandle) { return this.replicatedData.contains(activityHandle.getId()); }
/** * Create the Diameter Activity Handle for an given session id * * @param sessionId * the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }
public void stopActivityRemoveTimer(DiameterActivityHandle handle) { DiameterActivity da = this.get(handle); if(da != null) { synchronized (da) { this.faultTolerantTimer.cancel(handle.getId()); if(tracer.isFineEnabled()) { tracer.fine("Canceled Activity Remove Timer for ACH ID '" + handle.getId() + "'"); } } } }
/** * Create the Diameter Activity Handle for an given session id. * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(final String sessionId) { return new DiameterActivityHandle(sessionId); }
public DiameterActivity remove(DiameterActivityHandle handle) { DiameterActivity ac = this.replicatedData.get(handle.getId()); Transaction tx = null; try { tx = sleeTxManager.suspend(); } catch (SystemException e) { // ignore } replicatedData.remove(handle.getId()); if (tx != null) { try { sleeTxManager.resume(tx); } catch (Throwable e) { // ignore } } return ac; }
/** * Create the Diameter Activity Handle for an given session id. * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(final String sessionId) { return new DiameterActivityHandle(sessionId); }
public void startActivityRemoveTimer(DiameterActivityHandle handle) { DiameterActivity da = this.get(handle); if(da != null) { DiameterFaultTolerantTimerTaskData data = new DiameterFaultTolerantTimerTaskData(handle.getId()); ActivityRemovalFaultTolerantTimerTask task = new ActivityRemovalFaultTolerantTimerTask(data); this.faultTolerantTimer.schedule(task, delay, TimeUnit.MILLISECONDS); if(tracer.isFineEnabled()) { tracer.fine("Scheduled Activity Remove Timer for ACH ID '" + handle.getId() + "' with delay of " + delay + "ms"); } } }
/** * Create the Diameter Activity Handle for an given session id * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }
public DiameterActivity get(DiameterActivityHandle handle) { // tricky, now we need remote to kick in. // for that some impl methods need to be accessed... DiameterActivityImpl activity = (DiameterActivityImpl) this.replicatedData.get(handle.getId()); //FIXME: add check for RA if (activity != null) { // now we have to set some resources... if(activity.getSessionListener() == null) { performBeforeReturn(activity); } } return activity; }
/** * Create the Diameter Activity Handle for an given session id * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }
/** * Create the Diameter Activity Handle for an given session id * * @param sessionId the session identifier to create the activity handle from * @return a DiameterActivityHandle for the provided sessionId */ protected DiameterActivityHandle getActivityHandle(String sessionId) { return new DiameterActivityHandle(sessionId); }