+ return s.storage.RemoveAllAndPublish(s.nameSpace, channelsAndEvents)
+}
+
+//AddMember adds a new members to a group.
+//
+//SDL groups are unordered collections of members where each member is
+//unique. It is possible to add the same member several times without the
+//need to check if it already exists.
+//Deprecated: Will be removed in a future release, please use the AddMember
+//receiver function of the SyncStorage type.
+func (s *SdlInstance) AddMember(group string, member ...interface{}) error {
+ return s.storage.AddMember(s.nameSpace, group, member...)
+}
+
+//RemoveMember removes members from a group.
+//Deprecated: Will be removed in a future release, please use the RemoveMember
+//receiver function of the SyncStorage type.
+func (s *SdlInstance) RemoveMember(group string, member ...interface{}) error {
+ return s.storage.RemoveMember(s.nameSpace, group, member...)
+}
+
+//RemoveGroup removes the whole group along with it's members.
+//Deprecated: Will be removed in a future release, please use the RemoveGroup
+//receiver function of the SyncStorage type.
+func (s *SdlInstance) RemoveGroup(group string) error {
+ return s.storage.RemoveGroup(s.nameSpace, group)
+}
+
+//GetMembers returns all the members from a group.
+//Deprecated: Will be removed in a future release, please use the GetMembers
+//receiver function of the SyncStorage type.
+func (s *SdlInstance) GetMembers(group string) ([]string, error) {
+ return s.storage.GetMembers(s.nameSpace, group)
+}
+
+//IsMember returns true if given member is found from a group.
+func (s *SdlInstance) IsMember(group string, member interface{}) (bool, error) {
+ return s.storage.IsMember(s.nameSpace, group, member)
+}
+
+//GroupSize returns the number of members in a group.
+//Deprecated: Will be removed in a future release, please use the GroupSize
+//receiver function of the SyncStorage type.
+func (s *SdlInstance) GroupSize(group string) (int64, error) {
+ return s.storage.GroupSize(s.nameSpace, group)
+}
+
+//LockResource function is used for locking a resource. The resource lock in
+//practice is a key with random value that is set to expire after a time
+//period. The value written to key is a random value, thus only the instance
+//created a lock, can release it. Resource locks are per namespace.
+//Deprecated: Will be removed in a future release, please use the LockResource
+//receiver function of the SyncStorage type.
+func (s *SdlInstance) LockResource(resource string, expiration time.Duration, opt *Options) (*Lock, error) {
+ l, err := s.storage.LockResource(s.nameSpace, resource, expiration, opt)
+ if l != nil {
+ return &Lock{
+ s: s,
+ storageLock: l,
+ }, err
+ }
+ return nil, err
+}
+
+//ReleaseResource removes the lock from a resource. If lock is already
+//expired or some other instance is keeping the lock (lock taken after expiration),
+//an error is returned.
+//Deprecated: Will be removed in a future release, please use the ReleaseResource
+//receiver function of the SyncStorageLock type.
+func (l *Lock) ReleaseResource() error {
+ return l.storageLock.ReleaseResource(l.s.nameSpace)
+}
+
+//RefreshResource function can be used to set a new expiration time for the
+//resource lock (if the lock still exists). The old remaining expiration
+//time is overwritten with the given new expiration time.
+//Deprecated: Will be removed in a future release, please use the RefreshResource
+//receiver function of the SyncStorageLock type.
+func (l *Lock) RefreshResource(expiration time.Duration) error {
+ return l.storageLock.RefreshResource(l.s.nameSpace, expiration)
+}
+
+//CheckResource returns the expiration time left for a resource.
+//If the resource doesn't exist, -2 is returned.
+//Deprecated: Will be removed in a future release, please use the CheckResource
+//receiver function of the SyncStorage type.
+func (s *SdlInstance) CheckResource(resource string) (time.Duration, error) {
+ return s.storage.CheckResource(s.nameSpace, resource)
+}
+
+//Options struct defines the behaviour for getting the resource lock.
+type Options struct {
+ //The number of time the lock will be tried.
+ //Default: 0 = no retry
+ RetryCount int
+
+ //Wait between the retries.
+ //Default: 100ms
+ RetryWait time.Duration
+}
+
+func (o *Options) getRetryCount() int {
+ if o != nil && o.RetryCount > 0 {
+ return o.RetryCount